jQuery(function(a){if("undefined"==typeof wc_cart_fragments_params)return!1;try{$supports_html5_storage="sessionStorage"in window&&null!==window.sessionStorage}catch(b){$supports_html5_storage=!1}if($fragment_refresh={url:wc_cart_fragments_params.ajax_url,type:"POST",data:{action:"woocommerce_get_refreshed_fragments"},success:function(b){b&&b.fragments&&(a.each(b.fragments,function(b,c){a(b).replaceWith(c)}),$supports_html5_storage&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(b.fragments)),sessionStorage.setItem("wc_cart_hash",b.cart_hash)),a("body").trigger("wc_fragments_refreshed"))}},$supports_html5_storage){a("body").bind("added_to_cart",function(a,b,c){sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(b)),sessionStorage.setItem("wc_cart_hash",c)});try{var c=a.parseJSON(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),d=sessionStorage.getItem("wc_cart_hash"),e=a.cookie("woocommerce_cart_hash");if((null===d||void 0===d||""===d)&&(d=""),(null===e||void 0===e||""===e)&&(e=""),!c||!c["div.widget_shopping_cart_content"]||d!=e)throw"No fragment";a.each(c,function(b,c){a(b).replaceWith(c)}),a("body").trigger("wc_fragments_loaded")}catch(b){a.ajax($fragment_refresh)}}else a.ajax($fragment_refresh);a.cookie("woocommerce_items_in_cart")>0?a(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():a(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),a("body").bind("adding_to_cart",function(){a(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()})}); var addComment={moveForm:function(a,b,c,d){var e,f=this,g=f.I(a),h=f.I(c),i=f.I("cancel-comment-reply-link"),j=f.I("comment_parent"),k=f.I("comment_post_ID");if(g&&h&&i&&j){f.respondId=c,d=d||!1,f.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",h.parentNode.insertBefore(e,h)),g.parentNode.insertBefore(h,g.nextSibling),k&&d&&(k.value=d),j.value=b,i.style.display="",i.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{f.I("comment").focus()}catch(l){}return!1}},I:function(a){return document.getElementById(a)}}; window.Modernizr=function(e,t,n){function A(e){f.cssText=e}function O(e,t){return A(p.join(e+";")+(t||""))}function M(e,t){return typeof e===t}function _(e,t){return!!~(""+e).indexOf(t)}function D(e,t){for(var r in e){var i=e[r];if(!_(i,"-")&&f[i]!==n)return t=="pfx"?i:!0}return!1}function P(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n)return r===!1?e[i]:M(s,"function")?s.bind(r||t):s}return!1}function H(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+v.join(r+" ")+r).split(" ");if(M(t,"string")||M(t,"undefined"))return D(i,t);i=(e+" "+m.join(r+" ")+r).split(" ");return P(i,t,n)}function B(){i.input=function(n){for(var r=0,i=n.length;r',e,""].join("");c.id=u;(h?c:p).innerHTML+=s;p.appendChild(c);if(!h){p.style.background="";p.style.overflow="hidden";l=o.style.overflow;o.style.overflow="hidden";o.appendChild(p)}a=n(c,e);if(!h){p.parentNode.removeChild(p);o.style.overflow=l}else c.parentNode.removeChild(c);return!!a},N=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t).matches;var r;T("@media "+t+" { #"+u+" { position: absolute; }}",function(t){r=(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle)["position"]=="absolute"});return r},C=function(){function r(r,i){i=i||t.createElement(e[r]||"div");r="on"+r;var s=r in i;if(!s){i.setAttribute||(i=t.createElement("div"));if(i.setAttribute&&i.removeAttribute){i.setAttribute(r,"");s=M(i[r],"function");M(i[r],"undefined")||(i[r]=n);i.removeAttribute(r)}}i=null;return s}var e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return r}(),k={}.hasOwnProperty,L;!M(k,"undefined")&&!M(k.call,"undefined")?L=function(e,t){return k.call(e,t)}:L=function(e,t){return t in e&&M(e.constructor.prototype[t],"undefined")};Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError;var r=S.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,o=n.apply(s,r.concat(S.call(arguments)));return Object(o)===o?o:s}return n.apply(t,r.concat(S.call(arguments)))};return i});y.flexbox=function(){return H("flexWrap")};y.canvas=function(){var e=t.createElement("canvas");return!!e.getContext&&!!e.getContext("2d")};y.canvastext=function(){return!!i.canvas&&!!M(t.createElement("canvas").getContext("2d").fillText,"function")};y.webgl=function(){return!!e.WebGLRenderingContext};y.touch=function(){var n;"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:T(["@media (",p.join("touch-enabled),("),u,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=e.offsetTop===9});return n};y.geolocation=function(){return"geolocation"in navigator};y.postmessage=function(){return!!e.postMessage};y.websqldatabase=function(){return!!e.openDatabase};y.indexedDB=function(){return!!H("indexedDB",e)};y.hashchange=function(){return C("hashchange",e)&&(t.documentMode===n||t.documentMode>7)};y.history=function(){return!!e.history&&!!history.pushState};y.draganddrop=function(){var e=t.createElement("div");return"draggable"in e||"ondragstart"in e&&"ondrop"in e};y.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e};y.rgba=function(){A("background-color:rgba(150,255,150,.5)");return _(f.backgroundColor,"rgba")};y.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return _(f.backgroundColor,"rgba")||_(f.backgroundColor,"hsla")};y.multiplebgs=function(){A("background:url(https://),url(https://),red url(https://)");return/(url\s*\(.*?){3}/.test(f.background)};y.backgroundsize=function(){return H("backgroundSize")};y.borderimage=function(){return H("borderImage")};y.borderradius=function(){return H("borderRadius")};y.boxshadow=function(){return H("boxShadow")};y.textshadow=function(){return t.createElement("div").style.textShadow===""};y.opacity=function(){O("opacity:.55");return/^0.55$/.test(f.opacity)};y.cssanimations=function(){return H("animationName")};y.csscolumns=function(){return H("columnCount")};y.cssgradients=function(){var e="background-image:",t="gradient(linear,left top,right bottom,from(#9f9),to(white));",n="linear-gradient(left top,#9f9, white);";A((e+"-webkit- ".split(" ").join(t+e)+p.join(n+e)).slice(0,-e.length));return _(f.backgroundImage,"gradient")};y.cssreflections=function(){return H("boxReflect")};y.csstransforms=function(){return!!H("transform")};y.csstransforms3d=function(){var e=!!H("perspective");e&&"webkitPerspective"in o.style&&T("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=t.offsetLeft===9&&t.offsetHeight===3});return e};y.csstransitions=function(){return H("transition")};y.fontface=function(){var e;T('@font-face {font-family:"font";src:url("https://")}',function(n,r){var i=t.getElementById("smodernizr"),s=i.sheet||i.styleSheet,o=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"";e=/src/i.test(o)&&o.indexOf(r.split(" ")[0])===0});return e};y.generatedcontent=function(){var e;T(["#",u,"{font:0/0 a}#",u,':after{content:"',c,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){e=t.offsetHeight>=3});return e};y.video=function(){var e=t.createElement("video"),n=!1;try{if(n=!!e.canPlayType){n=new Boolean(n);n.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,"");n.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,"");n.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}}catch(r){}return n};y.audio=function(){var e=t.createElement("audio"),n=!1;try{if(n=!!e.canPlayType){n=new Boolean(n);n.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,"");n.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,"");n.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,"");n.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,"")}}catch(r){}return n};y.localstorage=function(){try{localStorage.setItem(u,u);localStorage.removeItem(u);return!0}catch(e){return!1}};y.sessionstorage=function(){try{sessionStorage.setItem(u,u);sessionStorage.removeItem(u);return!0}catch(e){return!1}};y.webworkers=function(){return!!e.Worker};y.applicationcache=function(){return!!e.applicationCache};y.svg=function(){return!!t.createElementNS&&!!t.createElementNS(g.svg,"svg").createSVGRect};y.inlinesvg=function(){var e=t.createElement("div");e.innerHTML="";return(e.firstChild&&e.firstChild.namespaceURI)==g.svg};y.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(h.call(t.createElementNS(g.svg,"animate")))};y.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(h.call(t.createElementNS(g.svg,"clipPath")))};for(var j in y)if(L(y,j)){x=j.toLowerCase();i[x]=y[j]();E.push((i[x]?"":"no-")+x)}i.input||B();i.addTest=function(e,t){if(typeof e=="object")for(var r in e)L(e,r)&&i.addTest(r,e[r]);else{e=e.toLowerCase();if(i[e]!==n)return i;t=typeof t=="function"?t():t;typeof s!="undefined"&&s&&(o.className+=" "+(t?"":"no-")+e);i[e]=t}return i};A("");a=l=null;i._version=r;i._prefixes=p;i._domPrefixes=m;i._cssomPrefixes=v;i.mq=N;i.hasEvent=C;i.testProp=function(e){return D([e])};i.testAllProps=H;i.testStyles=T;i.prefixed=function(e,t,n){return t?H(e,t,n):H(e,"pfx")};o.className=o.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(s?" js "+E.join(" "):"");return i}(this,this.document);(function(e,t,n){function r(e){return"[object Function]"==d.call(e)}function i(e){return"string"==typeof e}function s(){}function o(e){return!e||"loaded"==e||"complete"==e||"uninitialized"==e}function u(){var e=v.shift();m=1,e?e.t?h(function(){("c"==e.t?k.injectCss:k.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),u()):m=0}function a(e,n,r,i,s,a,f){function l(t){if(!d&&o(c.readyState)&&(w.r=d=1,!m&&u(),c.onload=c.onreadystatechange=null,t)){"img"!=e&&h(function(){b.removeChild(c)},50);for(var r in T[n])T[n].hasOwnProperty(r)&&T[n][r].onload()}}var f=f||k.errorTimeout,c=t.createElement(e),d=0,g=0,w={t:r,s:n,e:s,a:a,x:f};1===T[n]&&(g=1,T[n]=[]),"object"==e?c.data=n:(c.src=n,c.type=e),c.width=c.height="0",c.onerror=c.onload=c.onreadystatechange=function(){l.call(this,g)},v.splice(i,0,w),"img"!=e&&(g||2===T[n]?(b.insertBefore(c,y?null:p),h(l,f)):T[n].push(c))}function f(e,t,n,r,s){return m=0,t=t||"j",i(e)?a("c"==t?E:w,e,t,this.i++,n,r,s):(v.splice(this.i++,0,e),1==v.length&&u()),this}function l(){var e=k;return e.loader={load:f,i:0},e}var c=t.documentElement,h=e.setTimeout,p=t.getElementsByTagName("script")[0],d={}.toString,v=[],m=0,g="MozAppearance"in c.style,y=g&&!!t.createRange().compareNode,b=y?c:p.parentNode,c=e.opera&&"[object Opera]"==d.call(e.opera),c=!!t.attachEvent&&!c,w=g?"object":c?"script":"img",E=c?"script":w,S=Array.isArray||function(e){return"[object Array]"==d.call(e)},x=[],T={},N={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}},C,k;k=function(e){function t(e){var e=e.split("!"),t=x.length,n=e.pop(),r=e.length,n={url:n,origUrl:n,prefixes:e},i,s,o;for(s=0;st){debug(n,"Not enough items ("+t+" total, "+r+" needed): Hiding navigation.");var i="hide"}else var i="show";var s=i=="show"?"removeClass":"addClass",o=cf_c("hidden",n);e.auto.button&&e.auto.button[i]()[s](o);e.prev.button&&e.prev.button[i]()[s](o);e.next.button&&e.next.button[i]()[s](o);e.pagination.container&&e.pagination.container[i]()[s](o)}function nv_enableNavi(e,t,n){if(e.circular||e.infinite)return;var r=t=="removeClass"||t=="addClass"?t:!1,i=cf_c("disabled",n);e.auto.button&&r&&e.auto.button[r](i);if(e.prev.button){var s=r||t==0?"addClass":"removeClass";e.prev.button[s](i)}if(e.next.button){var s=r||t==e.items.visible?"addClass":"removeClass";e.next.button[s](i)}}function go_getObject(e,t){is_function(t)?t=t.call(e):is_undefined(t)&&(t={});return t}function go_getItemsObject(e,t){t=go_getObject(e,t);is_number(t)?t={visible:t}:t=="variable"?t={visible:t,width:t,height:t}:is_object(t)||(t={});return t}function go_getScrollObject(e,t){t=go_getObject(e,t);is_number(t)?t<=50?t={items:t}:t={duration:t}:is_string(t)?t={easing:t}:is_object(t)||(t={});return t}function go_getNaviObject(e,t){t=go_getObject(e,t);if(is_string(t)){var n=cf_getKeyCode(t);n==-1?t=$(t):t=n}return t}function go_getAutoObject(e,t){t=go_getNaviObject(e,t);is_jquery(t)?t={button:t}:is_boolean(t)?t={play:t}:is_number(t)&&(t={timeoutDuration:t});t.progress&&(is_string(t.progress)||is_jquery(t.progress))&&(t.progress={bar:t.progress});return t}function go_complementAutoObject(e,t){is_function(t.button)&&(t.button=t.button.call(e));is_string(t.button)&&(t.button=$(t.button));is_boolean(t.play)||(t.play=!0);is_number(t.delay)||(t.delay=0);is_undefined(t.pauseOnEvent)&&(t.pauseOnEvent=!0);is_boolean(t.pauseOnResize)||(t.pauseOnResize=!0);is_number(t.timeoutDuration)||(t.timeoutDuration=t.duration<10?2500:t.duration*5);if(t.progress){is_function(t.progress.bar)&&(t.progress.bar=t.progress.bar.call(e));is_string(t.progress.bar)&&(t.progress.bar=$(t.progress.bar));if(t.progress.bar){is_function(t.progress.updater)||(t.progress.updater=$.fn.carouFredSel.progressbarUpdater);is_number(t.progress.interval)||(t.progress.interval=50)}else t.progress=!1}return t}function go_getPrevNextObject(e,t){t=go_getNaviObject(e,t);is_jquery(t)?t={button:t}:is_number(t)&&(t={key:t});return t}function go_complementPrevNextObject(e,t){is_function(t.button)&&(t.button=t.button.call(e));is_string(t.button)&&(t.button=$(t.button));is_string(t.key)&&(t.key=cf_getKeyCode(t.key));return t}function go_getPaginationObject(e,t){t=go_getNaviObject(e,t);is_jquery(t)?t={container:t}:is_boolean(t)&&(t={keys:t});return t}function go_complementPaginationObject(e,t){is_function(t.container)&&(t.container=t.container.call(e));is_string(t.container)&&(t.container=$(t.container));is_number(t.items)||(t.items=!1);is_boolean(t.keys)||(t.keys=!1);!is_function(t.anchorBuilder)&&!is_false(t.anchorBuilder)&&(t.anchorBuilder=$.fn.carouFredSel.pageAnchorBuilder);is_number(t.deviation)||(t.deviation=0);return t}function go_getSwipeObject(e,t){is_function(t)&&(t=t.call(e));is_undefined(t)&&(t={onTouch:!1});is_true(t)?t={onTouch:t}:is_number(t)&&(t={items:t});return t}function go_complementSwipeObject(e,t){is_boolean(t.onTouch)||(t.onTouch=!0);is_boolean(t.onMouse)||(t.onMouse=!1);is_object(t.options)||(t.options={});is_boolean(t.options.triggerOnTouchEnd)||(t.options.triggerOnTouchEnd=!1);return t}function go_getMousewheelObject(e,t){is_function(t)&&(t=t.call(e));is_true(t)?t={}:is_number(t)?t={items:t}:is_undefined(t)&&(t=!1);return t}function go_complementMousewheelObject(e,t){return t}function gn_getItemIndex(e,t,n,r,i){is_string(e)&&(e=$(e,i));is_object(e)&&(e=$(e,i));if(is_jquery(e)){e=i.children().index(e);is_boolean(n)||(n=!1)}else is_boolean(n)||(n=!0);is_number(e)||(e=0);is_number(t)||(t=0);n&&(e+=r.first);e+=t;if(r.total>0){while(e>=r.total)e-=r.total;while(e<0)e+=r.total}return e}function gn_getVisibleItemsPrev(e,t,n){var r=0,i=0;for(var s=n;s>=0;s--){var o=e.eq(s);r+=o.is(":visible")?o[t.d.outerWidth](!0):0;if(r>t.maxDimension)return i;s==0&&(s=e.length);i++}}function gn_getVisibleItemsPrevFilter(e,t,n){return gn_getItemsPrevFilter(e,t.items.filter,t.items.visibleConf.org,n)}function gn_getScrollItemsPrevFilter(e,t,n,r){return gn_getItemsPrevFilter(e,t.items.filter,r,n)}function gn_getItemsPrevFilter(e,t,n,r){var i=0,s=0;for(var o=r,u=e.length;o>=0;o--){s++;if(s==u)return s;var a=e.eq(o);if(a.is(t)){i++;if(i==n)return s}o==0&&(o=u)}}function gn_getVisibleOrg(e,t){return t.items.visibleConf.org||e.children().slice(0,t.items.visible).filter(t.items.filter).length}function gn_getVisibleItemsNext(e,t,n){var r=0,i=0;for(var s=n,o=e.length-1;s<=o;s++){var u=e.eq(s);r+=u.is(":visible")?u[t.d.outerWidth](!0):0;if(r>t.maxDimension)return i;i++;if(i==o+1)return i;s==o&&(s=-1)}}function gn_getVisibleItemsNextTestCircular(e,t,n,r){var i=gn_getVisibleItemsNext(e,t,n);t.circular||n+i>r&&(i=r-n);return i}function gn_getVisibleItemsNextFilter(e,t,n){return gn_getItemsNextFilter(e,t.items.filter,t.items.visibleConf.org,n,t.circular)}function gn_getScrollItemsNextFilter(e,t,n,r){return gn_getItemsNextFilter(e,t.items.filter,r+1,n,t.circular)-1}function gn_getItemsNextFilter(e,t,n,r,i){var s=0,o=0;for(var u=r,a=e.length-1;u<=a;u++){o++;if(o>=a)return o;var f=e.eq(u);if(f.is(t)){s++;if(s==n)return o}u==a&&(u=-1)}}function gi_getCurrentItems(e,t){return e.slice(0,t.items.visible)}function gi_getOldItemsPrev(e,t,n){return e.slice(n,t.items.visibleConf.old+n)}function gi_getNewItemsPrev(e,t){return e.slice(0,t.items.visible)}function gi_getOldItemsNext(e,t){return e.slice(0,t.items.visibleConf.old)}function gi_getNewItemsNext(e,t,n){return e.slice(n,t.items.visible+n)}function sz_storeMargin(e,t,n){if(t.usePadding){is_string(n)||(n="_cfs_origCssMargin");e.each(function(){var e=$(this),r=parseInt(e.css(t.d.marginRight),10);is_number(r)||(r=0);e.data(n,r)})}}function sz_resetMargin(e,t,n){if(t.usePadding){var r=is_boolean(n)?n:!1;is_number(n)||(n=0);sz_storeMargin(e,t,"_cfs_tempCssMargin");e.each(function(){var e=$(this);e.css(t.d.marginRight,r?e.data("_cfs_tempCssMargin"):n+e.data("_cfs_origCssMargin"))})}}function sz_storeOrigCss(e){e.each(function(){var e=$(this);e.data("_cfs_origCss",e.attr("style")||"")})}function sz_restoreOrigCss(e){e.each(function(){var e=$(this);e.attr("style",e.data("_cfs_origCss")||"")})}function sz_setResponsiveSizes(e,t){var n=e.items.visible,r=e.items[e.d.width],i=e[e.d.height],s=is_percentage(i);t.each(function(){var t=$(this),n=r-ms_getPaddingBorderMargin(t,e,"Width");t[e.d.width](n);s&&t[e.d.height](ms_getPercentage(n,i))})}function sz_setSizes(e,t){var n=e.parent(),r=e.children(),i=gi_getCurrentItems(r,t),s=cf_mapWrapperSizes(ms_getSizes(i,t,!0),t,!1);n.css(s);if(t.usePadding){var o=t.padding,u=o[t.d[1]];t.align&&u<0&&(u=0);var a=i.last();a.css(t.d.marginRight,a.data("_cfs_origCssMargin")+u);e.css(t.d.top,o[t.d[0]]);e.css(t.d.left,o[t.d[3]])}e.css(t.d.width,s[t.d.width]+ms_getTotalSize(r,t,"width")*2);e.css(t.d.height,ms_getLargestSize(r,t,"height"));return s}function ms_getSizes(e,t,n){return[ms_getTotalSize(e,t,"width",n),ms_getLargestSize(e,t,"height",n)]}function ms_getLargestSize(e,t,n,r){is_boolean(r)||(r=!1);if(is_number(t[t.d[n]])&&r)return t[t.d[n]];if(is_number(t.items[t.d[n]]))return t.items[t.d[n]];n=n.toLowerCase().indexOf("width")>-1?"outerWidth":"outerHeight";return ms_getTrueLargestSize(e,t,n)}function ms_getTrueLargestSize(e,t,n){var r=0;for(var i=0,s=e.length;i-1?"outerWidth":"outerHeight",s=0;for(var o=0,u=e.length;o-1&&is_undefined(n[s])){n[s]=e[r];break}return n}function cf_getPadding(e){if(is_undefined(e))return[0,0,0,0];if(is_number(e))return[e,e,e,e];is_string(e)&&(e=e.split("px").join("").split("em").join("").split(" "));if(!is_array(e))return[0,0,0,0];for(var t=0;t<4;t++)e[t]=parseInt(e[t],10);switch(e.length){case 0:return[0,0,0,0];case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];default:return[e[0],e[1],e[2],e[3]]}}function cf_getAlignPadding(e,t){var n=is_number(t[t.d.width])?Math.ceil(t[t.d.width]-ms_getTotalSize(e,t,"width")):0;switch(t.align){case"left":return[0,n];case"right":return[n,0];case"center":default:return[Math.ceil(n/2),Math.floor(n/2)]}}function cf_getDimensions(e){var t=[["width","innerWidth","outerWidth","height","innerHeight","outerHeight","left","top","marginRight",0,1,2,3],["height","innerHeight","outerHeight","width","innerWidth","outerWidth","top","left","marginBottom",3,2,1,0]],n=t[0].length,r=e.direction=="right"||e.direction=="left"?0:1,i={};for(var s=0;ss.length)var u=!0,a=o[0],f=o[1];else var u=!1,a=s[0],f=s[1];switch(a){case"even":i=e%2==1?e-1:e;break;case"odd":i=e%2==0?e-1:e;break;default:i=e}f=parseInt(f,10);if(is_number(f)){u&&(f=-f);i+=f}}if(!is_number(i)||i<1)i=1;return i}function cf_getItemsAdjust(e,t,n,r){return cf_getItemAdjustMinMax(cf_getAdjust(e,t,n,r),t.items.visibleConf)}function cf_getItemAdjustMinMax(e,t){is_number(t.min)&&et.max&&(e=t.max);e<1&&(e=1);return e}function cf_getSynchArr(e){is_array(e)||(e=[[e]]);is_array(e[0])||(e=[e]);for(var t=0,n=e.length;t0?":visible":"*");if(!e[t.d.width])if(t.responsive){debug(!0,"Set a "+t.d.width+" for the items!");e[t.d.width]=ms_getTrueLargestSize(n,t,"outerWidth")}else e[t.d.width]=ms_hasVariableSizes(n,t,"outerWidth")?"variable":n[t.d.outerWidth](!0);e[t.d.height]||(e[t.d.height]=ms_hasVariableSizes(n,t,"outerHeight")?"variable":n[t.d.outerHeight](!0));e.sizesConf.width=e.width;e.sizesConf.height=e.height;return e}function in_complementVisibleItems(e,t){e.items[e.d["width"]]=="variable"&&(e.items.visibleConf.variable=!0);if(!e.items.visibleConf.variable){if(is_number(e[e.d.width]))e.items.visible=Math.floor(e[e.d.width]/e.items[e.d.width]);else{e.items.visible=Math.floor(t/e.items[e.d.width]);e[e.d.width]=e.items.visible*e.items[e.d.width];e.items.visibleConf.adjust||(e.align=!1)}if(e.items.visible=="Infinity"||e.items.visible<1){debug(!0,'Not a valid number of visible items: Set to "variable".');e.items.visibleConf.variable=!0}}return e}function in_complementPrimarySize(e,t,n){e=="auto"&&(e=ms_getTrueLargestSize(n,t,"outerWidth"));return e}function in_complementSecondarySize(e,t,n){e=="auto"&&(e=ms_getTrueLargestSize(n,t,"outerHeight"));e||(e=t.items[t.d.height]);return e}function in_getAlignPadding(e,t){var n=cf_getAlignPadding(gi_getCurrentItems(t,e),e);e.padding[e.d[1]]=n[1];e.padding[e.d[3]]=n[0];return e}function in_getResponsiveValues(e,t,n){var r=cf_getItemAdjustMinMax(Math.ceil(e[e.d.width]/e.items[e.d.width]),e.items.visibleConf);r>t.length&&(r=t.length);var i=Math.floor(e[e.d.width]/r);e.items.visible=r;e.items[e.d.width]=i;e[e.d.width]=r*i;return e}function bt_pauseOnHoverConfig(e){if(is_string(e))var t=e.indexOf("immediate")>-1?!0:!1,n=e.indexOf("resume")>-1?!0:!1;else var t=n=!1;return[t,n]}function bt_mousesheelNumber(e){return is_number(e)?e:null}function is_null(e){return e===null}function is_undefined(e){return is_null(e)||typeof e=="undefined"||e===""||e==="undefined"}function is_array(e){return e instanceof Array}function is_jquery(e){return e instanceof jQuery}function is_object(e){return(e instanceof Object||typeof e=="object")&&!is_null(e)&&!is_jquery(e)&&!is_array(e)&&!is_function(e)}function is_number(e){return(e instanceof Number||typeof e=="number")&&!isNaN(e)}function is_string(e){return(e instanceof String||typeof e=="string")&&!is_undefined(e)&&!is_true(e)&&!is_false(e)}function is_function(e){return e instanceof Function||typeof e=="function"}function is_boolean(e){return e instanceof Boolean||typeof e=="boolean"||is_true(e)||is_false(e)}function is_true(e){return e===!0||e==="true"}function is_false(e){return e===!1||e==="false"}function is_percentage(e){return is_string(e)&&e.slice(-1)=="%"}function getTime(){return(new Date).getTime()}function deprecated(e,t){debug(!0,e+" is DEPRECATED, support for it will be removed. Use "+t+" instead.")}function debug(e,t){if(!is_undefined(window.console)&&!is_undefined(window.console.log)){if(is_object(e)){var n=" ("+e.selector+")";e=e.debug}else var n="";if(!e)return!1;is_string(t)?t="carouFredSel"+n+": "+t:t=["carouFredSel"+n+":",t];window.console.log(t)}return!1}if($.fn.carouFredSel)return;$.fn.caroufredsel=$.fn.carouFredSel=function(options,configs){if(this.length==0){debug(!0,'No element found for "'+this.selector+'".');return this}if(this.length>1)return this.each(function(){$(this).carouFredSel(options,configs)});var $cfs=this,$tt0=this[0],starting_position=!1;if($cfs.data("_cfs_isCarousel")){starting_position=$cfs.triggerHandler("_cfs_triggerEvent","currentPosition");$cfs.trigger("_cfs_triggerEvent",["destroy",!0])}var FN={};FN._init=function(e,t,n){e=go_getObject($tt0,e);e.items=go_getItemsObject($tt0,e.items);e.scroll=go_getScrollObject($tt0,e.scroll);e.auto=go_getAutoObject($tt0,e.auto);e.prev=go_getPrevNextObject($tt0,e.prev);e.next=go_getPrevNextObject($tt0,e.next);e.pagination=go_getPaginationObject($tt0,e.pagination);e.swipe=go_getSwipeObject($tt0,e.swipe);e.mousewheel=go_getMousewheelObject($tt0,e.mousewheel);t&&(opts_orig=$.extend(!0,{},$.fn.carouFredSel.defaults,e));opts=$.extend(!0,{},$.fn.carouFredSel.defaults,e);opts.d=cf_getDimensions(opts);crsl.direction=opts.direction=="up"||opts.direction=="left"?"next":"prev";var r=$cfs.children(),i=ms_getParentSize($wrp,opts,"width");is_true(opts.cookie)&&(opts.cookie="caroufredsel_cookie_"+conf.serialNumber);opts.maxDimension=ms_getMaxDimension(opts,i);opts.items=in_complementItems(opts.items,opts,r,n);opts[opts.d.width]=in_complementPrimarySize(opts[opts.d.width],opts,r);opts[opts.d.height]=in_complementSecondarySize(opts[opts.d.height],opts,r);opts.responsive&&(is_percentage(opts[opts.d.width])||(opts[opts.d.width]="100%"));if(is_percentage(opts[opts.d.width])){crsl.upDateOnWindowResize=!0;crsl.primarySizePercentage=opts[opts.d.width];opts[opts.d.width]=ms_getPercentage(i,crsl.primarySizePercentage);opts.items.visible||(opts.items.visibleConf.variable=!0)}if(opts.responsive){opts.usePadding=!1;opts.padding=[0,0,0,0];opts.align=!1;opts.items.visibleConf.variable=!1}else{opts.items.visible||(opts=in_complementVisibleItems(opts,i));if(!opts[opts.d.width])if(!opts.items.visibleConf.variable&&is_number(opts.items[opts.d.width])&&opts.items.filter=="*"){opts[opts.d.width]=opts.items.visible*opts.items[opts.d.width];opts.align=!1}else opts[opts.d.width]="variable";is_undefined(opts.align)&&(opts.align=is_number(opts[opts.d.width])?"center":!1);opts.items.visibleConf.variable&&(opts.items.visible=gn_getVisibleItemsNext(r,opts,0))}if(opts.items.filter!="*"&&!opts.items.visibleConf.variable){opts.items.visibleConf.org=opts.items.visible;opts.items.visible=gn_getVisibleItemsNextFilter(r,opts,0)}opts.items.visible=cf_getItemsAdjust(opts.items.visible,opts,opts.items.visibleConf.adjust,$tt0);opts.items.visibleConf.old=opts.items.visible;if(opts.responsive){opts.items.visibleConf.min||(opts.items.visibleConf.min=opts.items.visible);opts.items.visibleConf.max||(opts.items.visibleConf.max=opts.items.visible);opts=in_getResponsiveValues(opts,r,i)}else{opts.padding=cf_getPadding(opts.padding);opts.align=="top"?opts.align="left":opts.align=="bottom"&&(opts.align="right");switch(opts.align){case"center":case"left":case"right":if(opts[opts.d["width"]]!="variable"){opts=in_getAlignPadding(opts,r);opts.usePadding=!0}break;default:opts.align=!1;opts.usePadding=opts.padding[0]==0&&opts.padding[1]==0&&opts.padding[2]==0&&opts.padding[3]==0?!1:!0}}is_number(opts.scroll.duration)||(opts.scroll.duration=500);is_undefined(opts.scroll.items)&&(opts.scroll.items=opts.responsive||opts.items.visibleConf.variable||opts.items.filter!="*"?"visible":opts.items.visible);opts.auto=$.extend(!0,{},opts.scroll,opts.auto);opts.prev=$.extend(!0,{},opts.scroll,opts.prev);opts.next=$.extend(!0,{},opts.scroll,opts.next);opts.pagination=$.extend(!0,{},opts.scroll,opts.pagination);opts.auto=go_complementAutoObject($tt0,opts.auto);opts.prev=go_complementPrevNextObject($tt0,opts.prev);opts.next=go_complementPrevNextObject($tt0,opts.next);opts.pagination=go_complementPaginationObject($tt0,opts.pagination);opts.swipe=go_complementSwipeObject($tt0,opts.swipe);opts.mousewheel=go_complementMousewheelObject($tt0,opts.mousewheel);opts.synchronise&&(opts.synchronise=cf_getSynchArr(opts.synchronise));if(opts.auto.onPauseStart){opts.auto.onTimeoutStart=opts.auto.onPauseStart;deprecated("auto.onPauseStart","auto.onTimeoutStart")}if(opts.auto.onPausePause){opts.auto.onTimeoutPause=opts.auto.onPausePause;deprecated("auto.onPausePause","auto.onTimeoutPause")}if(opts.auto.onPauseEnd){opts.auto.onTimeoutEnd=opts.auto.onPauseEnd;deprecated("auto.onPauseEnd","auto.onTimeoutEnd")}if(opts.auto.pauseDuration){opts.auto.timeoutDuration=opts.auto.pauseDuration;deprecated("auto.pauseDuration","auto.timeoutDuration")}};FN._build=function(){$cfs.data("_cfs_isCarousel",!0);var e=$cfs.children(),t=in_mapCss($cfs,["textAlign","float","position","top","right","bottom","left","zIndex","width","height","marginTop","marginRight","marginBottom","marginLeft"]),n="relative";switch(t.position){case"absolute":case"fixed":n=t.position}conf.wrapper=="parent"?sz_storeOrigCss($wrp):$wrp.css(t);$wrp.css({overflow:"hidden",position:n});sz_storeOrigCss($cfs);$cfs.data("_cfs_origCssZindex",t.zIndex);$cfs.css({textAlign:"left","float":"none",position:"absolute",top:0,right:"auto",bottom:"auto",left:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0});sz_storeMargin(e,opts);sz_storeOrigCss(e);opts.responsive&&sz_setResponsiveSizes(opts,e)};FN._bind_events=function(){FN._unbind_events();$cfs.bind(cf_e("stop",conf),function(e,t){e.stopPropagation();crsl.isStopped||opts.auto.button&&opts.auto.button.addClass(cf_c("stopped",conf));crsl.isStopped=!0;if(opts.auto.play){opts.auto.play=!1;$cfs.trigger(cf_e("pause",conf),t)}return!0});$cfs.bind(cf_e("finish",conf),function(e){e.stopPropagation();crsl.isScrolling&&sc_stopScroll(scrl);return!0});$cfs.bind(cf_e("pause",conf),function(e,t,n){e.stopPropagation();tmrs=sc_clearTimers(tmrs);if(t&&crsl.isScrolling){scrl.isStopped=!0;var r=getTime()-scrl.startTime;scrl.duration-=r;scrl.pre&&(scrl.pre.duration-=r);scrl.post&&(scrl.post.duration-=r);sc_stopScroll(scrl,!1)}!crsl.isPaused&&!crsl.isScrolling&&n&&(tmrs.timePassed+=getTime()-tmrs.startTime);crsl.isPaused||opts.auto.button&&opts.auto.button.addClass(cf_c("paused",conf));crsl.isPaused=!0;if(opts.auto.onTimeoutPause){var i=opts.auto.timeoutDuration-tmrs.timePassed,s=100-Math.ceil(i*100/opts.auto.timeoutDuration);opts.auto.onTimeoutPause.call($tt0,s,i)}return!0});$cfs.bind(cf_e("play",conf),function(e,t,n,r){e.stopPropagation();tmrs=sc_clearTimers(tmrs);var i=[t,n,r],s=["string","number","boolean"],o=cf_sortParams(i,s);t=o[0];n=o[1];r=o[2];t!="prev"&&t!="next"&&(t=crsl.direction);is_number(n)||(n=0);is_boolean(r)||(r=!1);if(r){crsl.isStopped=!1;opts.auto.play=!0}if(!opts.auto.play){e.stopImmediatePropagation();return debug(conf,"Carousel stopped: Not scrolling.")}if(crsl.isPaused&&opts.auto.button){opts.auto.button.removeClass(cf_c("stopped",conf));opts.auto.button.removeClass(cf_c("paused",conf))}crsl.isPaused=!1;tmrs.startTime=getTime();var u=opts.auto.timeoutDuration+n;dur2=u-tmrs.timePassed;perc=100-Math.ceil(dur2*100/u);opts.auto.progress&&(tmrs.progress=setInterval(function(){var e=getTime()-tmrs.startTime+tmrs.timePassed,t=Math.ceil(e*100/u);opts.auto.progress.updater.call(opts.auto.progress.bar[0],t)},opts.auto.progress.interval));tmrs.auto=setTimeout(function(){opts.auto.progress&&opts.auto.progress.updater.call(opts.auto.progress.bar[0],100);opts.auto.onTimeoutEnd&&opts.auto.onTimeoutEnd.call($tt0,perc,dur2);crsl.isScrolling?$cfs.trigger(cf_e("play",conf),t):$cfs.trigger(cf_e(t,conf),opts.auto)},dur2);opts.auto.onTimeoutStart&&opts.auto.onTimeoutStart.call($tt0,perc,dur2);return!0});$cfs.bind(cf_e("resume",conf),function(e){e.stopPropagation();if(scrl.isStopped){scrl.isStopped=!1;crsl.isPaused=!1;crsl.isScrolling=!0;scrl.startTime=getTime();sc_startScroll(scrl,conf)}else $cfs.trigger(cf_e("play",conf));return!0});$cfs.bind(cf_e("prev",conf)+" "+cf_e("next",conf),function(e,t,n,r,i){e.stopPropagation();if(crsl.isStopped||$cfs.is(":hidden")){e.stopImmediatePropagation();return debug(conf,"Carousel stopped or hidden: Not scrolling.")}var s=is_number(opts.items.minimum)?opts.items.minimum:opts.items.visible+1;if(s>itms.total){e.stopImmediatePropagation();return debug(conf,"Not enough items ("+itms.total+" total, "+s+" needed): Not scrolling.")}var o=[t,n,r,i],u=["object","number/string","function","boolean"],a=cf_sortParams(o,u);t=a[0];n=a[1];r=a[2];i=a[3];var f=e.type.slice(conf.events.prefix.length);is_object(t)||(t={});is_function(r)&&(t.onAfter=r);is_boolean(i)&&(t.queue=i);t=$.extend(!0,{},opts[f],t);if(t.conditions&&!t.conditions.call($tt0,f)){e.stopImmediatePropagation();return debug(conf,'Callback "conditions" returned false.')}if(!is_number(n)){if(opts.items.filter!="*")n="visible";else{var l=[n,t.items,opts[f].items];for(var a=0,c=l.length;a0&&crsl.isScrolling){if(t.queue){t.queue=="last"&&(queu=[]);(t.queue!="first"||queu.length==0)&&$cfs.trigger(cf_e("queue",conf),[f,[t,n,r]])}e.stopImmediatePropagation();return debug(conf,"Carousel currently scrolling.")}tmrs.timePassed=0;$cfs.trigger(cf_e("slide_"+f,conf),[t,n]);if(opts.synchronise){var h=opts.synchronise,p=[t,n];for(var d=0,c=h.length;d=itms.total)itms.first-=itms.total;if(!opts.circular){itms.first==0&&t.onEnd&&t.onEnd.call($tt0,"prev");opts.infinite||nv_enableNavi(opts,itms.first,conf)}$cfs.children().slice(itms.total-n,itms.total).prependTo($cfs);itms.total=0&&sz_resetMargin(f,opts,opts.padding[opts.d[1]]);c>=0&&sz_resetMargin(a,opts,opts.padding[opts.d[3]]);if(opts.align){opts.padding[opts.d[1]]=h;opts.padding[opts.d[3]]=c}k[opts.d.left]=-(b-d);L[opts.d.left]=-(E-d);x[opts.d.left]=w[opts.d.width];var O=function(){},M=function(){},_=function(){},D=function(){},P=function(){},H=function(){},B=function(){},j=function(){},F=function(){},I=function(){},q=function(){};switch(t.fx){case"crossfade":case"cover":case"cover-fade":case"uncover":case"uncover-fade":y=$cfs.clone(!0).appendTo($wrp)}switch(t.fx){case"crossfade":case"uncover":case"uncover-fade":y.children().slice(0,n).remove();y.children().slice(opts.items.visibleConf.old).remove();break;case"cover":case"cover-fade":y.children().slice(opts.items.visible).remove();y.css(L)}$cfs.css(k);scrl=sc_setScroll(A,t.easing,conf);S[opts.d.left]=opts.usePadding?opts.padding[opts.d[3]]:0;if(opts[opts.d["width"]]=="variable"||opts[opts.d["height"]]=="variable"){O=function(){$wrp.css(w)};M=function(){scrl.anims.push([$wrp,w])}}if(opts.usePadding){if(l.not(a).length){T[opts.d.marginRight]=a.data("_cfs_origCssMargin");if(c<0)a.css(T);else{B=function(){a.css(T)};j=function(){scrl.anims.push([a,T])}}}switch(t.fx){case"cover":case"cover-fade":y.children().eq(n-1).css(T)}if(l.not(f).length){N[opts.d.marginRight]=f.data("_cfs_origCssMargin");_=function(){f.css(N)};D=function(){scrl.anims.push([f,N])}}if(h>=0){C[opts.d.marginRight]=l.data("_cfs_origCssMargin")+opts.padding[opts.d[1]];P=function(){l.css(C)};H=function(){scrl.anims.push([l,C])}}}q=function(){$cfs.css(S)};var R=opts.items.visible+n-itms.total;I=function(){if(R>0){$cfs.children().slice(itms.total).remove();o=$($cfs.children().slice(itms.total-(opts.items.visible-R)).get().concat($cfs.children().slice(0,R).get()))}sc_showHiddenItems(v);if(opts.usePadding){var e=$cfs.children().eq(opts.items.visible+n-1);e.css(opts.d.marginRight,e.data("_cfs_origCssMargin"))}};var U=sc_mapCallbackArguments(o,m,u,n,"prev",A,w);F=function(){sc_afterScroll($cfs,y,t);crsl.isScrolling=!1;clbk.onAfter=sc_fireCallbacks($tt0,t,"onAfter",U,clbk);queu=sc_fireQueue($cfs,queu,conf);crsl.isPaused||$cfs.trigger(cf_e("play",conf))};crsl.isScrolling=!0;tmrs=sc_clearTimers(tmrs);clbk.onBefore=sc_fireCallbacks($tt0,t,"onBefore",U,clbk);switch(t.fx){case"none":$cfs.css(S);O();_();P();B();q();I();F();break;case"fade":scrl.anims.push([$cfs,{opacity:0},function(){O();_();P();B();q();I();scrl=sc_setScroll(A,t.easing,conf);scrl.anims.push([$cfs,{opacity:1},F]);sc_startScroll(scrl,conf)}]);break;case"crossfade":$cfs.css({opacity:0});scrl.anims.push([y,{opacity:0}]);scrl.anims.push([$cfs,{opacity:1},F]);M();_();P();B();q();I();break;case"cover":scrl.anims.push([y,S,function(){_();P();B();q();I();F()}]);M();break;case"cover-fade":scrl.anims.push([$cfs,{opacity:0}]);scrl.anims.push([y,S,function(){_();P();B();q();I();F()}]);M();break;case"uncover":scrl.anims.push([y,x,F]);M();_();P();B();q();I();break;case"uncover-fade":$cfs.css({opacity:0});scrl.anims.push([$cfs,{opacity:1}]);scrl.anims.push([y,x,F]);M();_();P();B();q();I();break;default:scrl.anims.push([$cfs,S,function(){I();F()}]);M();D();H();j()}sc_startScroll(scrl,conf);cf_setCookie(opts.cookie,$cfs,conf);$cfs.trigger(cf_e("updatePageStatus",conf),[!1,w]);return!0});$cfs.bind(cf_e("slide_next",conf),function(e,t,n){e.stopPropagation();var r=$cfs.children();if(!opts.circular&&itms.first==opts.items.visible){opts.infinite&&$cfs .trigger(cf_e("prev",conf),itms.total-1);return e.stopImmediatePropagation()}sz_resetMargin(r,opts);if(!is_number(n)){if(opts.items.filter!="*"){var i=is_number(t.items)?t.items:gn_getVisibleOrg($cfs,opts);n=gn_getScrollItemsNextFilter(r,opts,0,i)}else n=opts.items.visible;n=cf_getAdjust(n,opts,t.items,$tt0)}var s=itms.first==0?itms.total:itms.first;if(!opts.circular){if(opts.items.visibleConf.variable)var o=gn_getVisibleItemsNext(r,opts,n),i=gn_getVisibleItemsPrev(r,opts,s-1);else var o=opts.items.visible,i=opts.items.visible;n+o>s&&(n=s-i)}opts.items.visibleConf.old=opts.items.visible;if(opts.items.visibleConf.variable){var o=cf_getItemsAdjust(gn_getVisibleItemsNextTestCircular(r,opts,n,s),opts,opts.items.visibleConf.adjust,$tt0);while(opts.items.visible-n>=o&&n=0&&(j+=opts.padding[opts.d[1]]);c.css(opts.d.marginRight,j);f.not(l).length&&(N[opts.d.marginRight]=l.data("_cfs_origCssMargin"));O=function(){l.css(N)};M=function(){scrl.anims.push([l,N])};var F=f.data("_cfs_origCssMargin");h>0&&(F+=opts.padding[opts.d[3]]);T[opts.d.marginRight]=F;_=function(){f.css(T)};D=function(){scrl.anims.push([f,T])}}B=function(){$cfs.css(C)};var I=opts.items.visible+n-itms.total;H=function(){I>0&&$cfs.children().slice(itms.total).remove();var e=$cfs.children().slice(0,n).appendTo($cfs).last();I>0&&(a=gi_getCurrentItems(r,opts));sc_showHiddenItems(v);if(opts.usePadding){if(itms.totalt?"next":"prev");s=="prev"&&(t=itms.total-t);$cfs.trigger(cf_e(s,conf),[i,t,o]);return!0});$cfs.bind(cf_e("prevPage",conf),function(e,t,n){e.stopPropagation();var r=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[r-1,t,"prev",n])});$cfs.bind(cf_e("nextPage",conf),function(e,t,n){e.stopPropagation();var r=$cfs.triggerHandler(cf_e("currentPage",conf));return $cfs.triggerHandler(cf_e("slideToPage",conf),[r+1,t,"next",n])});$cfs.bind(cf_e("slideToPage",conf),function(e,t,n,r,i){e.stopPropagation();is_number(t)||(t=$cfs.triggerHandler(cf_e("currentPage",conf)));var s=opts.pagination.items||opts.items.visible,o=Math.ceil(itms.total/s)-1;t<0&&(t=o);t>o&&(t=0);return $cfs.triggerHandler(cf_e("slideTo",conf),[t*s,0,!0,n,r,i])});$cfs.bind(cf_e("jumpToStart",conf),function(e,t){e.stopPropagation();t?t=gn_getItemIndex(t,0,!0,itms,$cfs):t=0;t+=itms.first;if(t!=0){if(itms.total>0)while(t>itms.total)t-=itms.total;$cfs.prepend($cfs.children().slice(t,itms.total))}return!0});$cfs.bind(cf_e("synchronise",conf),function(e,t){e.stopPropagation();if(t)t=cf_getSynchArr(t);else{if(!opts.synchronise)return debug(conf,"No carousel to synchronise.");t=opts.synchronise}var n=$cfs.triggerHandler(cf_e("currentPosition",conf)),r=!0;for(var i=0,s=t.length;i=itms.total&&(itms.first-=itms.total);$cfs.trigger(cf_e("updateSizes",conf));$cfs.trigger(cf_e("linkAnchors",conf));return!0});$cfs.bind(cf_e("removeItem",conf),function(e,t,n,r){e.stopPropagation();var i=[t,n,r],s=["string/number/object","boolean","number"],o=cf_sortParams(i,s);t=o[0];n=o[1];r=o[2];var u=!1;if(t instanceof $&&t.length>1){a=$();t.each(function(e,t){var i=$cfs.trigger(cf_e("removeItem",conf),[$(this),n,r]);i&&(a=a.add(i))});return a}if(is_undefined(t)||t=="end")a=$cfs.children().last();else{t=gn_getItemIndex(t,r,n,itms,$cfs);var a=$cfs.children().eq(t);a.length&&tr&&(i=r);is_function(t)&&t.call($tt0,i);return i});$cfs.bind(cf_e("currentVisible",conf),function(e,t){e.stopPropagation();var n=gi_getCurrentItems($cfs.children(),opts);is_function(t)&&t.call($tt0,n);return n});$cfs.bind(cf_e("slice",conf),function(e,t,n,r){e.stopPropagation();if(itms.total==0)return!1;var i=[t,n,r],s=["number","number","function"],o=cf_sortParams(i,s);t=is_number(o[0])?o[0]:0;n=is_number(o[1])?o[1]:itms.total;r=o[2];t+=itms.first;n+=itms.first;if(items.total>0){while(t>itms.total)t-=itms.total;while(n>itms.total)n-=itms.total;while(t<0)t+=itms.total;while(n<0)n+=itms.total}var u=$cfs.children(),a;n>t?a=u.slice(t,n):a=$(u.slice(t,itms.total).get().concat(u.slice(0,n).get()));is_function(r)&&r.call($tt0,a);return a});$cfs.bind(cf_e("isPaused",conf)+" "+cf_e("isStopped",conf)+" "+cf_e("isScrolling",conf),function(e,t){e.stopPropagation();var n=e.type.slice(conf.events.prefix.length),r=crsl[n];is_function(t)&&t.call($tt0,r);return r});$cfs.bind(cf_e("configuration",conf),function(e,a,b,c){e.stopPropagation();var reInit=!1;if(is_function(a))a.call($tt0,opts);else if(is_object(a)){opts_orig=$.extend(!0,{},opts_orig,a);b!==!1?reInit=!0:opts=$.extend(!0,{},opts,a)}else if(!is_undefined(a))if(is_function(b)){var val=eval("opts."+a);is_undefined(val)&&(val="");b.call($tt0,val)}else{if(!!is_undefined(b))return eval("opts."+a);typeof c!="boolean"&&(c=!0);eval("opts_orig."+a+"=b");c!==!1?reInit=!0:eval("opts."+a+"=b")}if(reInit){sz_resetMargin($cfs.children(),opts);FN._init(opts_orig);FN._bind_buttons();var sz=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,sz])}return opts});$cfs.bind(cf_e("linkAnchors",conf),function(e,t,n){e.stopPropagation();is_undefined(t)?t=$("body"):is_string(t)&&(t=$(t));if(!is_jquery(t)||t.length==0)return debug(conf,"Not a valid object.");is_string(n)||(n="a.caroufredsel");t.find(n).each(function(){var e=this.hash||"";e.length>0&&$cfs.children().index($(e))!=-1&&$(this).unbind("click").click(function(t){t.preventDefault();$cfs.trigger(cf_e("slideTo",conf),e)})});return!0});$cfs.bind(cf_e("updatePageStatus",conf),function(e,t,n){e.stopPropagation();if(!opts.pagination.container)return;var r=opts.pagination.items||opts.items.visible,i=Math.ceil(itms.total/r);if(t){if(opts.pagination.anchorBuilder){opts.pagination.container.children().remove();opts.pagination.container.each(function(){for(var e=0;e=i&&(s=0);s<0&&(s=i-1);opts.pagination.container.each(function(){$(this).children().removeClass(cf_c("selected",conf)).eq(s).addClass(cf_c("selected",conf))});return!0});$cfs.bind(cf_e("updateSizes",conf),function(e){var t=opts.items.visible,n=$cfs.children(),r=ms_getParentSize($wrp,opts,"width");itms.total=n.length;if(crsl.primarySizePercentage){opts.maxDimension=r;opts[opts.d.width]=ms_getPercentage(r,crsl.primarySizePercentage)}else opts.maxDimension=ms_getMaxDimension(opts,r);if(opts.responsive){opts.items.width=opts.items.sizesConf.width;opts.items.height=opts.items.sizesConf.height;opts=in_getResponsiveValues(opts,n,r);t=opts.items.visible;sz_setResponsiveSizes(opts,n)}else opts.items.visibleConf.variable?t=gn_getVisibleItemsNext(n,opts,0):opts.items.filter!="*"&&(t=gn_getVisibleItemsNextFilter(n,opts,0));if(!opts.circular&&itms.first!=0&&t>itms.first){if(opts.items.visibleConf.variable)var i=gn_getVisibleItemsPrev(n,opts,itms.first)-itms.first;else if(opts.items.filter!="*")var i=gn_getVisibleItemsPrevFilter(n,opts,itms.first)-itms.first;else var i=opts.items.visible-itms.first;debug(conf,"Preventing non-circular: sliding "+i+" items backward.");$cfs.trigger(cf_e("prev",conf),i)}opts.items.visible=cf_getItemsAdjust(t,opts,opts.items.visibleConf.adjust,$tt0);opts.items.visibleConf.old=opts.items.visible;opts=in_getAlignPadding(opts,n);var s=sz_setSizes($cfs,opts);$cfs.trigger(cf_e("updatePageStatus",conf),[!0,s]);nv_showNavi(opts,itms.total,conf);nv_enableNavi(opts,itms.first,conf);return s});$cfs.bind(cf_e("destroy",conf),function(e,t){e.stopPropagation();tmrs=sc_clearTimers(tmrs);$cfs.data("_cfs_isCarousel",!1);$cfs.trigger(cf_e("finish",conf));t&&$cfs.trigger(cf_e("jumpToStart",conf));sz_restoreOrigCss($cfs.children());sz_restoreOrigCss($cfs);FN._unbind_events();FN._unbind_buttons();conf.wrapper=="parent"?sz_restoreOrigCss($wrp):$wrp.replaceWith($cfs);return!0});$cfs.bind(cf_e("debug",conf),function(e){debug(conf,"Carousel width: "+opts.width);debug(conf,"Carousel height: "+opts.height);debug(conf,"Item widths: "+opts.items.width);debug(conf,"Item heights: "+opts.items.height);debug(conf,"Number of items visible: "+opts.items.visible);opts.auto.play&&debug(conf,"Number of items scrolled automatically: "+opts.auto.items);opts.prev.button&&debug(conf,"Number of items scrolled backward: "+opts.prev.items);opts.next.button&&debug(conf,"Number of items scrolled forward: "+opts.next.items);return conf.debug});$cfs.bind("_cfs_triggerEvent",function(e,t,n){e.stopPropagation();return $cfs.triggerHandler(cf_e(t,conf),n)})};FN._unbind_events=function(){$cfs.unbind(cf_e("",conf));$cfs.unbind(cf_e("",conf,!1));$cfs.unbind("_cfs_triggerEvent")};FN._bind_buttons=function(){FN._unbind_buttons();nv_showNavi(opts,itms.total,conf);nv_enableNavi(opts,itms.first,conf);if(opts.auto.pauseOnHover){var e=bt_pauseOnHoverConfig(opts.auto.pauseOnHover);$wrp.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),e)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}opts.auto.button&&opts.auto.button.bind(cf_e(opts.auto.event,conf,!1),function(e){e.preventDefault();var t=!1,n=null;if(crsl.isPaused)t="play";else if(opts.auto.pauseOnEvent){t="pause";n=bt_pauseOnHoverConfig(opts.auto.pauseOnEvent)}t&&$cfs.trigger(cf_e(t,conf),n)});if(opts.prev.button){opts.prev.button.bind(cf_e(opts.prev.event,conf,!1),function(e){e.preventDefault();$cfs.trigger(cf_e("prev",conf))});if(opts.prev.pauseOnHover){var e=bt_pauseOnHoverConfig(opts.prev.pauseOnHover);opts.prev.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),e)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}}if(opts.next.button){opts.next.button.bind(cf_e(opts.next.event,conf,!1),function(e){e.preventDefault();$cfs.trigger(cf_e("next",conf))});if(opts.next.pauseOnHover){var e=bt_pauseOnHoverConfig(opts.next.pauseOnHover);opts.next.button.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),e)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}}if(opts.pagination.container&&opts.pagination.pauseOnHover){var e=bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);opts.pagination.container.bind(cf_e("mouseenter",conf,!1),function(){$cfs.trigger(cf_e("pause",conf),e)}).bind(cf_e("mouseleave",conf,!1),function(){$cfs.trigger(cf_e("resume",conf))})}(opts.prev.key||opts.next.key)&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(e){var t=e.keyCode;if(t==opts.next.key){e.preventDefault();$cfs.trigger(cf_e("next",conf))}if(t==opts.prev.key){e.preventDefault();$cfs.trigger(cf_e("prev",conf))}});opts.pagination.keys&&$(document).bind(cf_e("keyup",conf,!1,!0,!0),function(e){var t=e.keyCode;if(t>=49&&t<58){t=(t-49)*opts.items.visible;if(t<=itms.total){e.preventDefault();$cfs.trigger(cf_e("slideTo",conf),[t,0,!0,opts.pagination])}}});if($.fn.swipe){var t="ontouchstart"in window;if(t&&opts.swipe.onTouch||!t&&opts.swipe.onMouse){var n=$.extend(!0,{},opts.prev,opts.swipe),r=$.extend(!0,{},opts.next,opts.swipe),i=function(){$cfs.trigger(cf_e("prev",conf),[n])},s=function(){$cfs.trigger(cf_e("next",conf),[r])};switch(opts.direction){case"up":case"down":opts.swipe.options.swipeUp=s;opts.swipe.options.swipeDown=i;break;default:opts.swipe.options.swipeLeft=s;opts.swipe.options.swipeRight=i}crsl.swipe&&$cfs.swipe("destroy");$wrp.swipe(opts.swipe.options);$wrp.css("cursor","move");crsl.swipe=!0}}if($.fn.mousewheel&&opts.mousewheel){var o=$.extend(!0,{},opts.prev,opts.mousewheel),u=$.extend(!0,{},opts.next,opts.mousewheel);crsl.mousewheel&&$wrp.unbind(cf_e("mousewheel",conf,!1));$wrp.bind(cf_e("mousewheel",conf,!1),function(e,t){e.preventDefault();t>0?$cfs.trigger(cf_e("prev",conf),[o]):$cfs.trigger(cf_e("next",conf),[u])});crsl.mousewheel=!0}opts.auto.play&&$cfs.trigger(cf_e("play",conf),opts.auto.delay);if(crsl.upDateOnWindowResize){var a=function(e){$cfs.trigger(cf_e("finish",conf));opts.auto.pauseOnResize&&!crsl.isPaused&&$cfs.trigger(cf_e("play",conf));sz_resetMargin($cfs.children(),opts);$cfs.trigger(cf_e("updateSizes",conf))},f=$(window),l=null;if($.debounce&&conf.onWindowResize=="debounce")l=$.debounce(200,a);else if($.throttle&&conf.onWindowResize=="throttle")l=$.throttle(300,a);else{var c=0,h=0;l=function(){var e=f.width(),t=f.height();if(e!=c||t!=h){a();c=e;h=t}}}f.bind(cf_e("resize",conf,!1,!0,!0),l)}};FN._unbind_buttons=function(){var e=cf_e("",conf),t=cf_e("",conf,!1);ns3=cf_e("",conf,!1,!0,!0);$(document).unbind(ns3);$(window).unbind(ns3);$wrp.unbind(t);opts.auto.button&&opts.auto.button.unbind(t);opts.prev.button&&opts.prev.button.unbind(t);opts.next.button&&opts.next.button.unbind(t);if(opts.pagination.container){opts.pagination.container.unbind(t);opts.pagination.anchorBuilder&&opts.pagination.container.children().remove()}if(crsl.swipe){$cfs.swipe("destroy");$wrp.css("cursor","default");crsl.swipe=!1}crsl.mousewheel&&(crsl.mousewheel=!1);nv_showNavi(opts,"hide",conf);nv_enableNavi(opts,"removeClass",conf)};is_boolean(configs)&&(configs={debug:configs});var crsl={direction:"next",isPaused:!0,isScrolling:!1,isStopped:!1,mousewheel:!1,swipe:!1},itms={total:$cfs.children().length,first:0},tmrs={auto:null,progress:null,startTime:getTime(),timePassed:0},scrl={isStopped:!1,duration:0,startTime:0,easing:"",anims:[]},clbk={onBefore:[],onAfter:[]},queu=[],conf=$.extend(!0,{},$.fn.carouFredSel.configs,configs),opts={},opts_orig=$.extend(!0,{},options),$wrp=conf.wrapper=="parent"?$cfs.parent():$cfs.wrap("<"+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();conf.selector=$cfs.selector;conf.serialNumber=$.fn.carouFredSel.serialNumber++;conf.transition=conf.transition&&$.fn.transition?"transition":"animate";FN._init(opts_orig,!0,starting_position);FN._build();FN._bind_events();FN._bind_buttons();if(is_array(opts.items.start))var start_arr=opts.items.start;else{var start_arr=[];opts.items.start!=0&&start_arr.push(opts.items.start)}opts.cookie&&start_arr.unshift(parseInt(cf_getCookie(opts.cookie),10));if(start_arr.length>0)for(var a=0,l=start_arr.length;a'+e+""};$.fn.carouFredSel.progressbarUpdater=function(e){$(this).css("width",e+"%")};$.fn.carouFredSel.cookie={get:function(e){e+="=";var t=document.cookie.split(";");for(var n=0,r=t.length;n=options.elements.length){ log('invalid slide index: ' + num); return false; } options.nextSlide=num; if(cont.cycleTimeout){ clearTimeout(cont.cycleTimeout); cont.cycleTimeout=0; } if(typeof arg2=='string') options.oneTimeFx=arg2; go(options.elements, options, 1, num >=options.currSlide); return false; } return options; function checkInstantResume(isPaused, arg2, cont){ if(!isPaused&&arg2===true){ var options=$(cont).data('cycle.opts'); if(!options){ log('options not found, can not resume'); return false; } if(cont.cycleTimeout){ clearTimeout(cont.cycleTimeout); cont.cycleTimeout=0; } go(options.elements, options, 1, !options.backwards); }} } function removeFilter(el, opts){ if(!$.support.opacity&&opts.cleartype&&el.style.filter){ try { el.style.removeAttribute('filter'); } catch(smother){}} } function destroy(cont, opts){ if(opts.next) $(opts.next).unbind(opts.prevNextEvent); if(opts.prev) $(opts.prev).unbind(opts.prevNextEvent); if(opts.pager||opts.pagerAnchorBuilder) $.each(opts.pagerAnchors||[], function(){ this.unbind().remove(); }); opts.pagerAnchors=null; $(cont).unbind('mouseenter.cycle mouseleave.cycle'); if(opts.destroy) opts.destroy(opts); } function buildOptions($cont, $slides, els, options, o){ var startingSlideSpecified; var opts=$.extend({}, $.fn.cycle.defaults, options||{}, $.metadata ? $cont.metadata():$.meta ? $cont.data():{}); var meta=$.isFunction($cont.data) ? $cont.data(opts.metaAttr):null; if(meta) opts=$.extend(opts, meta); if(opts.autostop) opts.countdown=opts.autostopCount||els.length; var cont=$cont[0]; $cont.data('cycle.opts', opts); opts.$cont=$cont; opts.stopCount=cont.cycleStop; opts.elements=els; opts.before=opts.before ? [opts.before]:[]; opts.after=opts.after ? [opts.after]:[]; if(!$.support.opacity&&opts.cleartype) opts.after.push(function(){ removeFilter(this, opts); }); if(opts.continuous) opts.after.push(function(){ go(els,opts,0,!opts.backwards); }); saveOriginalOpts(opts); if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg) clearTypeFix($slides); if($cont.css('position')=='static') $cont.css('position', 'relative'); if(opts.width) $cont.width(opts.width); if(opts.height&&opts.height!='auto') $cont.height(opts.height); if(opts.startingSlide!==undefined){ opts.startingSlide=parseInt(opts.startingSlide,10); if(opts.startingSlide >=els.length||opts.startSlide < 0){ opts.startingSlide=0; }else{ startingSlideSpecified=true; }}else if(opts.backwards){ opts.startingSlide=els.length - 1; }else{ opts.startingSlide=0; } if(opts.random){ opts.randomMap=[]; for (var i=0; i < els.length; i++) opts.randomMap.push(i); opts.randomMap.sort(function(a,b){return Math.random() - 0.5;}); if(startingSlideSpecified){ for(var cnt=0; cnt < els.length; cnt++){ if(opts.startingSlide==opts.randomMap[cnt]){ opts.randomIndex=cnt; }} }else{ opts.randomIndex=1; opts.startingSlide=opts.randomMap[1]; }} else if(opts.startingSlide >=els.length) opts.startingSlide=0; opts.currSlide=opts.startingSlide||0; var first=opts.startingSlide; $slides.css({position: 'absolute', top:0, left:0}).hide().each(function(i){ var z; if(opts.backwards){ z=first ? i <=first ? els.length + (i-first):first-i:els.length-i; }else{ z=first ? i >=first ? els.length - (i-first):first-i:els.length-i; } $(this).css('z-index', z); }); $(els[first]).css('opacity',1).show(); removeFilter(els[first], opts); if(opts.fit){ if(!opts.aspect){ if(opts.width) $slides.width(opts.width); if(opts.height&&opts.height!='auto') $slides.height(opts.height); }else{ $slides.each(function(){ var $slide=$(this); var ratio=(opts.aspect===true) ? $slide.width()/$slide.height():opts.aspect; if(opts.width&&$slide.width()!=opts.width){ $slide.width(opts.width); $slide.height(opts.width / ratio); } if(opts.height&&$slide.height() < opts.height){ $slide.height(opts.height); $slide.width(opts.height * ratio); }}); }} if(opts.center&&((!opts.fit)||opts.aspect)){ $slides.each(function(){ var $slide=$(this); $slide.css({ "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px" : 0, "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px" : 0 }); }); } if(opts.center&&!opts.fit&&!opts.slideResize){ $slides.each(function(){ var $slide=$(this); $slide.css({ "margin-left": opts.width ? ((opts.width - $slide.width()) / 2) + "px":0, "margin-top": opts.height ? ((opts.height - $slide.height()) / 2) + "px":0 }); }); } var reshape=(opts.containerResize||opts.containerResizeHeight)&&$cont.innerHeight() < 1; if(reshape){ var maxw=0, maxh=0; for(var j=0; j < els.length; j++){ var $e=$(els[j]), e=$e[0], w=$e.outerWidth(), h=$e.outerHeight(); if(!w) w=e.offsetWidth||e.width||$e.attr('width'); if(!h) h=e.offsetHeight||e.height||$e.attr('height'); maxw=w > maxw ? w:maxw; maxh=h > maxh ? h:maxh; } if(opts.containerResize&&maxw > 0&&maxh > 0) $cont.animate({width:maxw+'px',height:maxh+'px'}); if(opts.containerResizeHeight&&maxh > 0) $cont.animate({height:maxh+'px'}); } var pauseFlag=false; if(opts.pause) $cont.bind('mouseenter.cycle', function(){ pauseFlag=true; this.cyclePause++; triggerPause(cont, true); }).bind('mouseleave.cycle', function(){ if(pauseFlag) this.cyclePause--; triggerPause(cont, true); }); if(supportMultiTransitions(opts)===false) return false; var requeue=false; options.requeueAttempts=options.requeueAttempts||0; $slides.each(function(){ var $el=$(this); this.cycleH=(opts.fit&&opts.height) ? opts.height:($el.height()||this.offsetHeight||this.height||$el.attr('height')||0); this.cycleW=(opts.fit&&opts.width) ? opts.width:($el.width()||this.offsetWidth||this.width||$el.attr('width')||0); if($el.is('img')){ var loading=(this.cycleH===0&&this.cycleW===0&&!this.complete); if(loading){ if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts < 100){ log(options.requeueAttempts,' - img slide not loaded, requeuing slideshow: ', this.src, this.cycleW, this.cycleH); setTimeout(function(){$(o.s,o.c).cycle(options);}, opts.requeueTimeout); requeue=true; return false; }else{ log('could not determine size of image: '+this.src, this.cycleW, this.cycleH); }} } return true; }); if(requeue) return false; opts.cssBefore=opts.cssBefore||{}; opts.cssAfter=opts.cssAfter||{}; opts.cssFirst=opts.cssFirst||{}; opts.animIn=opts.animIn||{}; opts.animOut=opts.animOut||{}; $slides.not(':eq('+first+')').css(opts.cssBefore); $($slides[first]).css(opts.cssFirst); if(opts.timeout){ opts.timeout=parseInt(opts.timeout,10); if(opts.speed.constructor==String) opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed,10); if(!opts.sync) opts.speed=opts.speed / 2; var buffer=opts.fx=='none' ? 0:opts.fx=='shuffle' ? 500:250; while((opts.timeout - opts.speed) < buffer) opts.timeout +=opts.speed; } if(opts.easing) opts.easeIn=opts.easeOut=opts.easing; if(!opts.speedIn) opts.speedIn=opts.speed; if(!opts.speedOut) opts.speedOut=opts.speed; opts.slideCount=els.length; opts.currSlide=opts.lastSlide=first; if(opts.random){ if(++opts.randomIndex==els.length) opts.randomIndex=0; opts.nextSlide=opts.randomMap[opts.randomIndex]; } else if(opts.backwards){ opts.nextSlide=opts.startingSlide===0 ? (els.length-1):opts.startingSlide-1; }else{ opts.nextSlide=opts.startingSlide >=(els.length-1) ? 0:opts.startingSlide+1; } if(!opts.multiFx){ var init=$.fn.cycle.transitions[opts.fx]; if($.isFunction(init)) init($cont, $slides, opts); else if(opts.fx!='custom'&&!opts.multiFx){ log('unknown transition: ' + opts.fx,'; slideshow terminating'); return false; }} var e0=$slides[first]; if(!opts.skipInitializationCallbacks){ if(opts.before.length) opts.before[0].apply(e0, [e0, e0, opts, true]); if(opts.after.length) opts.after[0].apply(e0, [e0, e0, opts, true]); } if(opts.next) $(opts.next).bind(opts.prevNextEvent,function(){return advance(opts,1);}); if(opts.prev) $(opts.prev).bind(opts.prevNextEvent,function(){return advance(opts,0);}); if(opts.pager||opts.pagerAnchorBuilder) buildPager(els,opts); exposeAddSlide(opts, els); return opts; } function saveOriginalOpts(opts){ opts.original={ before: [], after: [] }; opts.original.cssBefore=$.extend({}, opts.cssBefore); opts.original.cssAfter=$.extend({}, opts.cssAfter); opts.original.animIn=$.extend({}, opts.animIn); opts.original.animOut=$.extend({}, opts.animOut); $.each(opts.before, function(){ opts.original.before.push(this); }); $.each(opts.after, function(){ opts.original.after.push(this); }); } function supportMultiTransitions(opts){ var i, tx, txs=$.fn.cycle.transitions; if(opts.fx.indexOf(',') > 0){ opts.multiFx=true; opts.fxs=opts.fx.replace(/\s*/g,'').split(','); for (i=0; i < opts.fxs.length; i++){ var fx=opts.fxs[i]; tx=txs[fx]; if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){ log('discarding unknown transition: ',fx); opts.fxs.splice(i,1); i--; }} if(!opts.fxs.length){ log('No valid transitions named; slideshow terminating.'); return false; }} else if(opts.fx=='all'){ opts.multiFx=true; opts.fxs=[]; for (var p in txs){ if(txs.hasOwnProperty(p)){ tx=txs[p]; if(txs.hasOwnProperty(p)&&$.isFunction(tx)) opts.fxs.push(p); }} } if(opts.multiFx&&opts.randomizeEffects){ var r1=Math.floor(Math.random() * 20) + 30; for (i=0; i < r1; i++){ var r2=Math.floor(Math.random() * opts.fxs.length); opts.fxs.push(opts.fxs.splice(r2,1)[0]); } debug('randomized fx sequence: ',opts.fxs); } return true; } function exposeAddSlide(opts, els){ opts.addSlide=function(newSlide, prepend){ var $s=$(newSlide), s=$s[0]; if(!opts.autostopCount) opts.countdown++; els[prepend?'unshift':'push'](s); if(opts.els) opts.els[prepend?'unshift':'push'](s); opts.slideCount=els.length; if(opts.random){ opts.randomMap.push(opts.slideCount-1); opts.randomMap.sort(function(a,b){return Math.random() - 0.5;}); } $s.css('position','absolute'); $s[prepend?'prependTo':'appendTo'](opts.$cont); if(prepend){ opts.currSlide++; opts.nextSlide++; } if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg) clearTypeFix($s); if(opts.fit&&opts.width) $s.width(opts.width); if(opts.fit&&opts.height&&opts.height!='auto') $s.height(opts.height); s.cycleH=(opts.fit&&opts.height) ? opts.height:$s.height(); s.cycleW=(opts.fit&&opts.width) ? opts.width:$s.width(); $s.css(opts.cssBefore); if(opts.pager||opts.pagerAnchorBuilder) $.fn.cycle.createPagerAnchor(els.length-1, s, $(opts.pager), els, opts); if($.isFunction(opts.onAddSlide)) opts.onAddSlide($s); else $s.hide(); };} $.fn.cycle.resetState=function(opts, fx){ fx=fx||opts.fx; opts.before=[]; opts.after=[]; opts.cssBefore=$.extend({}, opts.original.cssBefore); opts.cssAfter=$.extend({}, opts.original.cssAfter); opts.animIn=$.extend({}, opts.original.animIn); opts.animOut=$.extend({}, opts.original.animOut); opts.fxFn=null; $.each(opts.original.before, function(){ opts.before.push(this); }); $.each(opts.original.after, function(){ opts.after.push(this); }); var init=$.fn.cycle.transitions[fx]; if($.isFunction(init)) init(opts.$cont, $(opts.elements), opts); }; function go(els, opts, manual, fwd){ var p=opts.$cont[0], curr=els[opts.currSlide], next=els[opts.nextSlide]; if(manual&&opts.busy&&opts.manualTrump){ debug('manualTrump in go(), stopping active transition'); $(els).stop(true,true); opts.busy=0; clearTimeout(p.cycleTimeout); } if(opts.busy){ debug('transition active, ignoring new tx request'); return; } if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual) return; if(!manual&&!p.cyclePause&&!opts.bounce && ((opts.autostop&&(--opts.countdown <=0)) || (opts.nowrap&&!opts.random&&opts.nextSlide < opts.currSlide))){ if(opts.end) opts.end(opts); return; } var changed=false; if((manual||!p.cyclePause)&&(opts.nextSlide!=opts.currSlide)){ changed=true; var fx=opts.fx; curr.cycleH=curr.cycleH||$(curr).height(); curr.cycleW=curr.cycleW||$(curr).width(); next.cycleH=next.cycleH||$(next).height(); next.cycleW=next.cycleW||$(next).width(); if(opts.multiFx){ if(fwd&&(opts.lastFx===undefined||++opts.lastFx >=opts.fxs.length)) opts.lastFx=0; else if(!fwd&&(opts.lastFx===undefined||--opts.lastFx < 0)) opts.lastFx=opts.fxs.length - 1; fx=opts.fxs[opts.lastFx]; } if(opts.oneTimeFx){ fx=opts.oneTimeFx; opts.oneTimeFx=null; } $.fn.cycle.resetState(opts, fx); if(opts.before.length) $.each(opts.before, function(i,o){ if(p.cycleStop!=opts.stopCount) return; o.apply(next, [curr, next, opts, fwd]); }); var after=function(){ opts.busy=0; $.each(opts.after, function(i,o){ if(p.cycleStop!=opts.stopCount) return; o.apply(next, [curr, next, opts, fwd]); }); if(!p.cycleStop){ queueNext(); }}; debug('tx firing('+fx+'); currSlide: ' + opts.currSlide + '; nextSlide: ' + opts.nextSlide); opts.busy=1; if(opts.fxFn){ opts.fxFn(curr, next, opts, after, fwd, manual&&opts.fastOnEvent); }else if($.isFunction($.fn.cycle[opts.fx])){ $.fn.cycle[opts.fx](curr, next, opts, after, fwd, manual&&opts.fastOnEvent); }else{ $.fn.cycle.custom(curr, next, opts, after, fwd, manual&&opts.fastOnEvent); }}else{ queueNext(); } if(changed||opts.nextSlide==opts.currSlide){ var roll; opts.lastSlide=opts.currSlide; if(opts.random){ opts.currSlide=opts.nextSlide; if(++opts.randomIndex==els.length){ opts.randomIndex=0; opts.randomMap.sort(function(a,b){return Math.random() - 0.5;}); } opts.nextSlide=opts.randomMap[opts.randomIndex]; if(opts.nextSlide==opts.currSlide) opts.nextSlide=(opts.currSlide==opts.slideCount - 1) ? 0:opts.currSlide + 1; } else if(opts.backwards){ roll=(opts.nextSlide - 1) < 0; if(roll&&opts.bounce){ opts.backwards = !opts.backwards; opts.nextSlide=1; opts.currSlide=0; }else{ opts.nextSlide=roll ? (els.length-1):opts.nextSlide-1; opts.currSlide=roll ? 0:opts.nextSlide+1; }}else{ roll=(opts.nextSlide + 1)==els.length; if(roll&&opts.bounce){ opts.backwards = !opts.backwards; opts.nextSlide=els.length-2; opts.currSlide=els.length-1; }else{ opts.nextSlide=roll ? 0:opts.nextSlide+1; opts.currSlide=roll ? els.length-1:opts.nextSlide-1; }} } if(changed&&opts.pager) opts.updateActivePagerLink(opts.pager, opts.currSlide, opts.activePagerClass); function queueNext(){ var ms=0, timeout=opts.timeout; if(opts.timeout&&!opts.continuous){ ms=getTimeout(els[opts.currSlide], els[opts.nextSlide], opts, fwd); if(opts.fx=='shuffle') ms -=opts.speedOut; } else if(opts.continuous&&p.cyclePause) ms=10; if(ms > 0) p.cycleTimeout=setTimeout(function(){ go(els, opts, 0, !opts.backwards); }, ms); }} $.fn.cycle.updateActivePagerLink=function(pager, currSlide, clsName){ $(pager).each(function(){ $(this).children().removeClass(clsName).eq(currSlide).addClass(clsName); }); }; function getTimeout(curr, next, opts, fwd){ if(opts.timeoutFn){ var t=opts.timeoutFn.call(curr,curr,next,opts,fwd); while (opts.fx!='none'&&(t - opts.speed) < 250) t +=opts.speed; debug('calculated timeout: ' + t + '; speed: ' + opts.speed); if(t!==false) return t; } return opts.timeout; } $.fn.cycle.next=function(opts){ advance(opts,1); }; $.fn.cycle.prev=function(opts){ advance(opts,0);}; function advance(opts, moveForward){ var val=moveForward ? 1:-1; var els=opts.elements; var p=opts.$cont[0], timeout=p.cycleTimeout; if(timeout){ clearTimeout(timeout); p.cycleTimeout=0; } if(opts.random&&val < 0){ opts.randomIndex--; if(--opts.randomIndex==-2) opts.randomIndex=els.length-2; else if(opts.randomIndex==-1) opts.randomIndex=els.length-1; opts.nextSlide=opts.randomMap[opts.randomIndex]; } else if(opts.random){ opts.nextSlide=opts.randomMap[opts.randomIndex]; }else{ opts.nextSlide=opts.currSlide + val; if(opts.nextSlide < 0){ if(opts.nowrap) return false; opts.nextSlide=els.length - 1; } else if(opts.nextSlide >=els.length){ if(opts.nowrap) return false; opts.nextSlide=0; }} var cb=opts.onPrevNextEvent||opts.prevNextClick; if($.isFunction(cb)) cb(val > 0, opts.nextSlide, els[opts.nextSlide]); go(els, opts, 1, moveForward); return false; } function buildPager(els, opts){ var $p=$(opts.pager); $.each(els, function(i,o){ $.fn.cycle.createPagerAnchor(i,o,$p,els,opts); }); opts.updateActivePagerLink(opts.pager, opts.startingSlide, opts.activePagerClass); } $.fn.cycle.createPagerAnchor=function(i, el, $p, els, opts){ var a; if($.isFunction(opts.pagerAnchorBuilder)){ a=opts.pagerAnchorBuilder(i,el); debug('pagerAnchorBuilder('+i+', el) returned: ' + a); }else{ a=''; } if(!a) return; var $a=$(a); if($a.parents('body').length===0){ var arr=[]; if($p.length > 1){ $p.each(function(){ var $clone=$a.clone(true); $(this).append($clone); arr.push($clone[0]); }); $a=$(arr); }else{ $a.appendTo($p); }} opts.pagerAnchors=opts.pagerAnchors||[]; opts.pagerAnchors.push($a); var pagerFn=function(e){ e.preventDefault(); opts.nextSlide=i; var p=opts.$cont[0], timeout=p.cycleTimeout; if(timeout){ clearTimeout(timeout); p.cycleTimeout=0; } var cb=opts.onPagerEvent||opts.pagerClick; if($.isFunction(cb)) cb(opts.nextSlide, els[opts.nextSlide]); go(els,opts,1,opts.currSlide < i); }; if(/mouseenter|mouseover/i.test(opts.pagerEvent)){ $a.hover(pagerFn, function(){}); }else{ $a.bind(opts.pagerEvent, pagerFn); } if(! /^click/.test(opts.pagerEvent)&&!opts.allowPagerClickBubble) $a.bind('click.cycle', function(){return false;}); var cont=opts.$cont[0]; var pauseFlag=false; if(opts.pauseOnPagerHover){ $a.hover(function(){ pauseFlag=true; cont.cyclePause++; triggerPause(cont,true,true); }, function(){ if(pauseFlag) cont.cyclePause--; triggerPause(cont,true,true); } ); }}; $.fn.cycle.hopsFromLast=function(opts, fwd){ var hops, l=opts.lastSlide, c=opts.currSlide; if(fwd) hops=c > l ? c - l:opts.slideCount - l; else hops=c < l ? l - c:l + opts.slideCount - c; return hops; }; function clearTypeFix($slides){ debug('applying clearType background-color hack'); function hex(s){ s=parseInt(s,10).toString(16); return s.length < 2 ? '0'+s:s; } function getBg(e){ for(; e&&e.nodeName.toLowerCase()!='html'; e=e.parentNode){ var v=$.css(e,'background-color'); if(v&&v.indexOf('rgb') >=0){ var rgb=v.match(/\d+/g); return '#'+ hex(rgb[0]) + hex(rgb[1]) + hex(rgb[2]); } if(v&&v!='transparent') return v; } return '#ffffff'; } $slides.each(function(){ $(this).css('background-color', getBg(this)); }); } $.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){ $(opts.elements).not(curr).hide(); if(typeof opts.cssBefore.opacity=='undefined') opts.cssBefore.opacity=1; opts.cssBefore.display='block'; if(opts.slideResize&&w!==false&&next.cycleW > 0) opts.cssBefore.width=next.cycleW; if(opts.slideResize&&h!==false&&next.cycleH > 0) opts.cssBefore.height=next.cycleH; opts.cssAfter=opts.cssAfter||{}; opts.cssAfter.display='none'; $(curr).css('zIndex',opts.slideCount + (rev===true ? 1:0)); $(next).css('zIndex',opts.slideCount + (rev===true ? 0:1)); }; $.fn.cycle.custom=function(curr, next, opts, cb, fwd, speedOverride){ var $l=$(curr), $n=$(next); var speedIn=opts.speedIn, speedOut=opts.speedOut, easeIn=opts.easeIn, easeOut=opts.easeOut, animInDelay=opts.animInDelay, animOutDelay=opts.animOutDelay; $n.css(opts.cssBefore); if(speedOverride){ if(typeof speedOverride=='number') speedIn=speedOut=speedOverride; else speedIn=speedOut=1; easeIn=easeOut=null; } var fn=function(){ $n.delay(animInDelay).animate(opts.animIn, speedIn, easeIn, function(){ cb(); }); }; $l.delay(animOutDelay).animate(opts.animOut, speedOut, easeOut, function(){ $l.css(opts.cssAfter); if(!opts.sync) fn(); }); if(opts.sync) fn(); }; $.fn.cycle.transitions={ fade: function($cont, $slides, opts){ $slides.not(':eq('+opts.currSlide+')').css('opacity',0); opts.before.push(function(curr,next,opts){ $.fn.cycle.commonReset(curr,next,opts); opts.cssBefore.opacity=0; }); opts.animIn={ opacity: 1 }; opts.animOut={ opacity: 0 }; opts.cssBefore={ top: 0, left: 0 };}}; $.fn.cycle.ver=function(){ return ver; }; $.fn.cycle.defaults={ activePagerClass: 'activeSlide', after: null, allowPagerClickBubble: false, animIn: null, animInDelay: 0, animOut: null, animOutDelay: 0, aspect: false, autostop: 0, autostopCount: 0, backwards: false, before: null, center: null, cleartype: !$.support.opacity, cleartypeNoBg: false, containerResize: 1, containerResizeHeight: 0, continuous: 0, cssAfter: null, cssBefore: null, delay: 0, easeIn: null, easeOut: null, easing: null, end: null, fastOnEvent: 0, fit: 0, fx: 'fade', fxFn: null, height: 'auto', manualTrump: true, metaAttr: 'cycle', next: null, nowrap: 0, onPagerEvent: null, onPrevNextEvent: null, pager: null, pagerAnchorBuilder: null, pagerEvent: 'click.cycle', pause: 0, pauseOnPagerHover: 0, prev: null, prevNextEvent: 'click.cycle', random: 0, randomizeEffects: 1, requeueOnImageNotLoaded: true, requeueTimeout: 250, rev: 0, shuffle: null, skipInitializationCallbacks: false, slideExpr: null, slideResize: 1, speed: 1000, speedIn: null, speedOut: null, startingSlide: undefined, sync: 1, timeout: 4000, timeoutFn: null, updateActivePagerLink: null, width: null };})(jQuery); (function($){ "use strict"; $.fn.cycle.transitions.none=function($cont, $slides, opts){ opts.fxFn=function(curr,next,opts,after){ $(next).show(); $(curr).hide(); after(); };}; $.fn.cycle.transitions.fadeout=function($cont, $slides, opts){ $slides.not(':eq('+opts.currSlide+')').css({ display: 'block', 'opacity': 1 }); opts.before.push(function(curr,next,opts,w,h,rev){ $(curr).css('zIndex',opts.slideCount + (rev!==true ? 1:0)); $(next).css('zIndex',opts.slideCount + (rev!==true ? 0:1)); }); opts.animIn.opacity=1; opts.animOut.opacity=0; opts.cssBefore.opacity=1; opts.cssBefore.display='block'; opts.cssAfter.zIndex=0; }; $.fn.cycle.transitions.scrollUp=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonReset); var h=$cont.height(); opts.cssBefore.top=h; opts.cssBefore.left=0; opts.cssFirst.top=0; opts.animIn.top=0; opts.animOut.top=-h; }; $.fn.cycle.transitions.scrollDown=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonReset); var h=$cont.height(); opts.cssFirst.top=0; opts.cssBefore.top=-h; opts.cssBefore.left=0; opts.animIn.top=0; opts.animOut.top=h; }; $.fn.cycle.transitions.scrollLeft=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonReset); var w=$cont.width(); opts.cssFirst.left=0; opts.cssBefore.left=w; opts.cssBefore.top=0; opts.animIn.left=0; opts.animOut.left=0-w; }; $.fn.cycle.transitions.scrollRight=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push($.fn.cycle.commonReset); var w=$cont.width(); opts.cssFirst.left=0; opts.cssBefore.left=-w; opts.cssBefore.top=0; opts.animIn.left=0; opts.animOut.left=w; }; $.fn.cycle.transitions.scrollHorz=function($cont, $slides, opts){ $cont.css('overflow','hidden').width(); opts.before.push(function(curr, next, opts, fwd){ if(opts.rev) fwd = !fwd; $.fn.cycle.commonReset(curr,next,opts); opts.cssBefore.left=fwd ? (next.cycleW-1):(1-next.cycleW); opts.animOut.left=fwd ? -curr.cycleW:curr.cycleW; }); opts.cssFirst.left=0; opts.cssBefore.top=0; opts.animIn.left=0; opts.animOut.top=0; }; $.fn.cycle.transitions.scrollVert=function($cont, $slides, opts){ $cont.css('overflow','hidden'); opts.before.push(function(curr, next, opts, fwd){ if(opts.rev) fwd = !fwd; $.fn.cycle.commonReset(curr,next,opts); opts.cssBefore.top=fwd ? (1-next.cycleH):(next.cycleH-1); opts.animOut.top=fwd ? curr.cycleH:-curr.cycleH; }); opts.cssFirst.top=0; opts.cssBefore.left=0; opts.animIn.top=0; opts.animOut.left=0; }; $.fn.cycle.transitions.slideX=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr,next,opts,false,true); opts.animIn.width=next.cycleW; }); opts.cssBefore.left=0; opts.cssBefore.top=0; opts.cssBefore.width=0; opts.animIn.width='show'; opts.animOut.width=0; }; $.fn.cycle.transitions.slideY=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $(opts.elements).not(curr).hide(); $.fn.cycle.commonReset(curr,next,opts,true,false); opts.animIn.height=next.cycleH; }); opts.cssBefore.left=0; opts.cssBefore.top=0; opts.cssBefore.height=0; opts.animIn.height='show'; opts.animOut.height=0; }; $.fn.cycle.transitions.shuffle=function($cont, $slides, opts){ var i, w=$cont.css('overflow', 'visible').width(); $slides.css({left: 0, top: 0}); opts.before.push(function(curr,next,opts){ $.fn.cycle.commonReset(curr,next,opts,true,true,true); }); if(!opts.speedAdjusted){ opts.speed=opts.speed / 2; opts.speedAdjusted=true; } opts.random=0; opts.shuffle=opts.shuffle||{left:-w, top:15}; opts.els=[]; for (i=0; i < $slides.length; i++) opts.els.push($slides[i]); for (i=0; i < opts.currSlide; i++) opts.els.push(opts.els.shift()); opts.fxFn=function(curr, next, opts, cb, fwd){ if(opts.rev) fwd = !fwd; var $el=fwd ? $(curr):$(next); $(next).css(opts.cssBefore); var count=opts.slideCount; $el.animate(opts.shuffle, opts.speedIn, opts.easeIn, function(){ var hops=$.fn.cycle.hopsFromLast(opts, fwd); for (var k=0; k < hops; k++){ if(fwd) opts.els.push(opts.els.shift()); else opts.els.unshift(opts.els.pop()); } if(fwd){ for (var i=0, len=opts.els.length; i < len; i++) $(opts.els[i]).css('z-index', len-i+count); }else{ var z=$(curr).css('z-index'); $el.css('z-index', parseInt(z,10)+1+count); } $el.animate({left:0, top:0}, opts.speedOut, opts.easeOut, function(){ $(fwd ? this:curr).hide(); if(cb) cb(); }); }); }; $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); }; $.fn.cycle.transitions.turnUp=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,false); opts.cssBefore.top=next.cycleH; opts.animIn.height=next.cycleH; opts.animOut.width=next.cycleW; }); opts.cssFirst.top=0; opts.cssBefore.left=0; opts.cssBefore.height=0; opts.animIn.top=0; opts.animOut.height=0; }; $.fn.cycle.transitions.turnDown=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,false); opts.animIn.height=next.cycleH; opts.animOut.top=curr.cycleH; }); opts.cssFirst.top=0; opts.cssBefore.left=0; opts.cssBefore.top=0; opts.cssBefore.height=0; opts.animOut.height=0; }; $.fn.cycle.transitions.turnLeft=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,true); opts.cssBefore.left=next.cycleW; opts.animIn.width=next.cycleW; }); opts.cssBefore.top=0; opts.cssBefore.width=0; opts.animIn.left=0; opts.animOut.width=0; }; $.fn.cycle.transitions.turnRight=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,true); opts.animIn.width=next.cycleW; opts.animOut.left=curr.cycleW; }); $.extend(opts.cssBefore, { top: 0, left: 0, width: 0 }); opts.animIn.left=0; opts.animOut.width=0; }; $.fn.cycle.transitions.zoom=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,false,true); opts.cssBefore.top=next.cycleH/2; opts.cssBefore.left=next.cycleW/2; $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); $.extend(opts.animOut, { width: 0, height: 0, top: curr.cycleH/2, left: curr.cycleW/2 }); }); opts.cssFirst.top=0; opts.cssFirst.left=0; opts.cssBefore.width=0; opts.cssBefore.height=0; }; $.fn.cycle.transitions.fadeZoom=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,false); opts.cssBefore.left=next.cycleW/2; opts.cssBefore.top=next.cycleH/2; $.extend(opts.animIn, { top: 0, left: 0, width: next.cycleW, height: next.cycleH }); }); opts.cssBefore.width=0; opts.cssBefore.height=0; opts.animOut.opacity=0; }; $.fn.cycle.transitions.blindX=function($cont, $slides, opts){ var w=$cont.css('overflow','hidden').width(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts); opts.animIn.width=next.cycleW; opts.animOut.left=curr.cycleW; }); opts.cssBefore.left=w; opts.cssBefore.top=0; opts.animIn.left=0; opts.animOut.left=w; }; $.fn.cycle.transitions.blindY=function($cont, $slides, opts){ var h=$cont.css('overflow','hidden').height(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts); opts.animIn.height=next.cycleH; opts.animOut.top=curr.cycleH; }); opts.cssBefore.top=h; opts.cssBefore.left=0; opts.animIn.top=0; opts.animOut.top=h; }; $.fn.cycle.transitions.blindZ=function($cont, $slides, opts){ var h=$cont.css('overflow','hidden').height(); var w=$cont.width(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts); opts.animIn.height=next.cycleH; opts.animOut.top=curr.cycleH; }); opts.cssBefore.top=h; opts.cssBefore.left=w; opts.animIn.top=0; opts.animIn.left=0; opts.animOut.top=h; opts.animOut.left=w; }; $.fn.cycle.transitions.growX=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,true); opts.cssBefore.left=this.cycleW/2; opts.animIn.left=0; opts.animIn.width=this.cycleW; opts.animOut.left=0; }); opts.cssBefore.top=0; opts.cssBefore.width=0; }; $.fn.cycle.transitions.growY=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,false); opts.cssBefore.top=this.cycleH/2; opts.animIn.top=0; opts.animIn.height=this.cycleH; opts.animOut.top=0; }); opts.cssBefore.height=0; opts.cssBefore.left=0; }; $.fn.cycle.transitions.curtainX=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,false,true,true); opts.cssBefore.left=next.cycleW/2; opts.animIn.left=0; opts.animIn.width=this.cycleW; opts.animOut.left=curr.cycleW/2; opts.animOut.width=0; }); opts.cssBefore.top=0; opts.cssBefore.width=0; }; $.fn.cycle.transitions.curtainY=function($cont, $slides, opts){ opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,false,true); opts.cssBefore.top=next.cycleH/2; opts.animIn.top=0; opts.animIn.height=next.cycleH; opts.animOut.top=curr.cycleH/2; opts.animOut.height=0; }); opts.cssBefore.height=0; opts.cssBefore.left=0; }; $.fn.cycle.transitions.cover=function($cont, $slides, opts){ var d=opts.direction||'left'; var w=$cont.css('overflow','hidden').width(); var h=$cont.height(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts); opts.cssAfter.display=''; if(d=='right') opts.cssBefore.left=-w; else if(d=='up') opts.cssBefore.top=h; else if(d=='down') opts.cssBefore.top=-h; else opts.cssBefore.left=w; }); opts.animIn.left=0; opts.animIn.top=0; opts.cssBefore.top=0; opts.cssBefore.left=0; }; $.fn.cycle.transitions.uncover=function($cont, $slides, opts){ var d=opts.direction||'left'; var w=$cont.css('overflow','hidden').width(); var h=$cont.height(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,true,true); if(d=='right') opts.animOut.left=w; else if(d=='up') opts.animOut.top=-h; else if(d=='down') opts.animOut.top=h; else opts.animOut.left=-w; }); opts.animIn.left=0; opts.animIn.top=0; opts.cssBefore.top=0; opts.cssBefore.left=0; }; $.fn.cycle.transitions.toss=function($cont, $slides, opts){ var w=$cont.css('overflow','visible').width(); var h=$cont.height(); opts.before.push(function(curr, next, opts){ $.fn.cycle.commonReset(curr,next,opts,true,true,true); if(!opts.animOut.left&&!opts.animOut.top) $.extend(opts.animOut, { left: w*2, top: -h/2, opacity: 0 }); else opts.animOut.opacity=0; }); opts.cssBefore.left=0; opts.cssBefore.top=0; opts.animIn.left=0; }; $.fn.cycle.transitions.wipe=function($cont, $slides, opts){ var w=$cont.css('overflow','hidden').width(); var h=$cont.height(); opts.cssBefore=opts.cssBefore||{}; var clip; if(opts.clip){ if(/l2r/.test(opts.clip)) clip='rect(0px 0px '+h+'px 0px)'; else if(/r2l/.test(opts.clip)) clip='rect(0px '+w+'px '+h+'px '+w+'px)'; else if(/t2b/.test(opts.clip)) clip='rect(0px '+w+'px 0px 0px)'; else if(/b2t/.test(opts.clip)) clip='rect('+h+'px '+w+'px '+h+'px 0px)'; else if(/zoom/.test(opts.clip)){ var top=parseInt(h/2,10); var left=parseInt(w/2,10); clip='rect('+top+'px '+left+'px '+top+'px '+left+'px)'; }} opts.cssBefore.clip=opts.cssBefore.clip||clip||'rect(0px 0px 0px 0px)'; var d=opts.cssBefore.clip.match(/(\d+)/g); var t=parseInt(d[0],10), r=parseInt(d[1],10), b=parseInt(d[2],10), l=parseInt(d[3],10); opts.before.push(function(curr, next, opts){ if(curr==next) return; var $curr=$(curr), $next=$(next); $.fn.cycle.commonReset(curr,next,opts,true,true,false); opts.cssAfter.display='block'; var step=1, count=parseInt((opts.speedIn / 13),10) - 1; (function f(){ var tt=t ? t - parseInt(step * (t/count),10):0; var ll=l ? l - parseInt(step * (l/count),10):0; var bb=b < h ? b + parseInt(step * ((h-b)/count||1),10):h; var rr=r < w ? r + parseInt(step * ((w-r)/count||1),10):w; $next.css({ clip: 'rect('+tt+'px '+rr+'px '+bb+'px '+ll+'px)' }); (step++ <=count) ? setTimeout(f, 13):$curr.css('display', 'none'); })(); }); $.extend(opts.cssBefore, { display: 'block', opacity: 1, top: 0, left: 0 }); opts.animIn={ left: 0 }; opts.animOut={ left: 0 };}; })(jQuery); (function(e){function t(){var e=location.href;return hashtag=-1!==e.indexOf("#prettyPhoto")?decodeURI(e.substring(e.indexOf("#prettyPhoto")+1,e.length)):!1}function n(e,t){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var n=RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null==n?"":n[1]}e.prettyPhoto={version:"3.1.5"};e.fn.prettyPhoto=function(r){function i(){e(".pp_loaderIcon").hide();projectedTop=scroll_pos.scrollTop+(S/2-m.containerHeight/2);0>projectedTop&&(projectedTop=0);$ppt.fadeTo(settings.animation_speed,1);$pp_pic_holder.find(".pp_content").animate({height:m.contentHeight,width:m.contentWidth},settings.animation_speed);$pp_pic_holder.animate({top:projectedTop,left:0>x/2-m.containerWidth/2?0:x/2-m.containerWidth/2,width:m.containerWidth},settings.animation_speed,function(){$pp_pic_holder.find(".pp_hoverContainer,#fullResImage").height(m.height).width(m.width);$pp_pic_holder.find(".pp_fade").fadeIn(settings.animation_speed);isSet&&"image"==f(pp_images[set_position])?$pp_pic_holder.find(".pp_hoverContainer").show():$pp_pic_holder.find(".pp_hoverContainer").hide();settings.allow_expand&&(m.resized?e("a.pp_expand,a.pp_contract").show():e("a.pp_expand").hide());settings.autoplay_slideshow&&!T&&!g&&e.prettyPhoto.startSlideshow();settings.changepicturecallback();g=!0});isSet&&settings.overlay_gallery&&"image"==f(pp_images[set_position])?(itemWidth=57,navWidth="facebook"==settings.theme||"pp_default"==settings.theme?50:30,itemsPerPage=Math.floor((m.containerWidth-100-navWidth)/itemWidth),itemsPerPage=itemsPerPagex||w>S)&&doresize&&settings.allow_resize&&!d){resized=!0;for(fitting=!1;!fitting;)E>x?(imageWidth=x-30,imageHeight=t/e*imageWidth):w>S?(imageHeight=S-100,imageWidth=e/t*imageHeight):fitting=!0,w=imageHeight,E=imageWidth;(E>x||w>S)&&o(E,w);u(imageWidth,imageHeight)}return{width:Math.floor(imageWidth),height:Math.floor(imageHeight),containerHeight:Math.floor(w),containerWidth:Math.floor(E)+2*settings.horizontal_padding,contentHeight:Math.floor(y),contentWidth:Math.floor(b),resized:resized}}function u(t,n){t=parseFloat(t);n=parseFloat(n);$pp_details=$pp_pic_holder.find(".pp_details");$pp_details.width(t);detailsHeight=parseFloat($pp_details.css("marginTop"))+parseFloat($pp_details.css("marginBottom"));$pp_details=$pp_details.clone().addClass(settings.theme).width(t).appendTo(e("body")).css({position:"absolute",top:-1e4});detailsHeight+=$pp_details.height();detailsHeight=34>=detailsHeight?36:detailsHeight;$pp_details.remove();$pp_title=$pp_pic_holder.find(".ppt");$pp_title.width(t);titleHeight=parseFloat($pp_title.css("marginTop"))+parseFloat($pp_title.css("marginBottom"));$pp_title=$pp_title.clone().appendTo(e("body")).css({position:"absolute",top:-1e4});titleHeight+=$pp_title.height();$pp_title.remove();y=n+detailsHeight;b=t;w=y+titleHeight+$pp_pic_holder.find(".pp_top").height()+$pp_pic_holder.find(".pp_bottom").height();E=t}function f(e){return e.match(/youtube\.com\/watch/i)||e.match(/youtu\.be/i)?"youtube":e.match(/vimeo\.com/i)?"vimeo":e.match(/\b.mov\b/i)?"quicktime":e.match(/\b.swf\b/i)?"flash":e.match(/\biframe=true\b/i)?"iframe":e.match(/\bajax=true\b/i)?"ajax":e.match(/\bcustom=true\b/i)?"custom":"#"==e.substr(0,1)?"inline":"image"}function l(){doresize&&"undefined"!=typeof $pp_pic_holder&&(scroll_pos=c(),contentHeight=$pp_pic_holder.height(),contentwidth=$pp_pic_holder.width(),projectedTop=S/2+scroll_pos.scrollTop-contentHeight/2,0>projectedTop&&(projectedTop=0),contentHeight>S||$pp_pic_holder.css({top:projectedTop,left:x/2+scroll_pos.scrollLeft-contentwidth/2}))}function c(){if(self.pageYOffset)return{scrollTop:self.pageYOffset,scrollLeft:self.pageXOffset};if(document.documentElement&&document.documentElement.scrollTop)return{scrollTop:document.documentElement.scrollTop,scrollLeft:document.documentElement.scrollLeft};if(document.body)return{scrollTop:document.body.scrollTop,scrollLeft:document.body.scrollLeft}}function h(){settings.social_tools&&(facebook_like_link=settings.social_tools.replace("{location_href}",encodeURIComponent(location.href)));settings.markup=settings.markup.replace("{pp_social}","");e("body").append(settings.markup);$pp_pic_holder=e(".pp_pic_holder");$ppt=e(".ppt");$pp_overlay=e("div.pp_overlay");if(isSet&&settings.overlay_gallery){currentGalleryPage=0;toInject="";for(var t=0;t";toInject=settings.gallery_markup.replace(/{gallery}/g,toInject);$pp_pic_holder.find("#pp_full_res").after(toInject);$pp_gallery=e(".pp_pic_holder .pp_gallery");$pp_gallery_li=$pp_gallery.find("li");$pp_gallery.find(".pp_arrow_next").click(function(){e.prettyPhoto.changeGalleryPage("next");e.prettyPhoto.stopSlideshow();return!1});$pp_gallery.find(".pp_arrow_previous").click(function(){e.prettyPhoto.changeGalleryPage("previous");e.prettyPhoto.stopSlideshow();return!1});$pp_pic_holder.find(".pp_content").hover(function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeIn()},function(){$pp_pic_holder.find(".pp_gallery:not(.disabled)").fadeOut()});itemWidth=57;$pp_gallery_li.each(function(t){e(this).find("a").click(function(){e.prettyPhoto.changePage(t);e.prettyPhoto.stopSlideshow();return!1})})}settings.slideshow&&($pp_pic_holder.find(".pp_nav").prepend('Play'),$pp_pic_holder.find(".pp_nav .pp_play").click(function(){e.prettyPhoto.startSlideshow();return!1}));$pp_pic_holder.attr("class","pp_pic_holder "+settings.theme);$pp_overlay.css({opacity:0.8,height:e(document).height(),width:e(window).width()}).bind("click",function(){settings.modal||e.prettyPhoto.close()});e("a.pp_close").bind("click",function(){e.prettyPhoto.close();return!1});settings.allow_expand&&e("a.pp_expand").bind("click",function(){e(this).hasClass("pp_expand")?(e(this).removeClass("pp_expand").addClass("pp_contract"),doresize=!1):(e(this).removeClass("pp_contract").addClass("pp_expand"),doresize=!0);s(function(){e.prettyPhoto.open()});return!1});$pp_pic_holder.find(".pp_previous, .pp_nav .pp_arrow_previous").bind("click",function(){e.prettyPhoto.changePage("previous");e.prettyPhoto.stopSlideshow();return!1});$pp_pic_holder.find(".pp_next, .pp_nav .pp_arrow_next").bind("click",function(){e.prettyPhoto.changePage("next");e.prettyPhoto.stopSlideshow();return!1});l()}r=jQuery.extend({hook:"rel",animation_speed:"fast",hd:!0,ajaxcallback:function(){},slideshow:5e3,autoplay_slideshow:!1,opacity:.8,show_title:!0,allow_resize:!0,allow_expand:!0,default_width:600,default_height:344,counter_separator_label:"/",theme:"pp_default",horizontal_padding:20,hideflash:!1,wmode:"opaque",autoplay:!0,modal:!1,deeplinking:!0,overlay_gallery:!0,overlay_gallery_max:30,keyboard_shortcuts:!0,changepicturecallback:function(){},callback:function(){},ie6_fallback:!0,markup:'
 
',gallery_markup:'',image_markup:'',flash_markup:'',quicktime_markup:'',iframe_markup:'',inline_markup:'
{content}
',custom_markup:"",social_tools:''},r);var p=this,d=!1,m,g,y,b,w,E,S=e(window).height(),x=e(window).width(),T;current_as_setting=r.autoplay_slideshow;current_og_setting=r.overlay_gallery;doresize=!0;scroll_pos=c();e(window).unbind("resize.prettyphoto").bind("resize.prettyphoto",function(){l();S=e(window).height();x=e(window).width();"undefined"!=typeof $pp_overlay&&$pp_overlay.height(e(document).height()).width(x)});r.keyboard_shortcuts&&e(document).unbind("keydown.prettyphoto").bind("keydown.prettyphoto",function(t){if("undefined"!=typeof $pp_pic_holder&&$pp_pic_holder.is(":visible"))switch(t.keyCode){case 37:e.prettyPhoto.changePage("previous");t.preventDefault();break;case 39:e.prettyPhoto.changePage("next");t.preventDefault();break;case 27:settings.modal||e.prettyPhoto.close(),t.preventDefault()}});e.prettyPhoto.initialize=function(){settings=r;"pp_default"==settings.theme&&(settings.horizontal_padding=16);theRel=e(this).attr(settings.hook);galleryRegExp=/\[(?:.*)\]/;pp_images=(isSet=galleryRegExp.exec(theRel)?!0:!1)?jQuery.map(p,function(t){if(-1!=e(t).attr(settings.hook).indexOf(theRel))return e(t).attr("href")}):e.makeArray(e(this).attr("href"));pp_titles=isSet?jQuery.map(p,function(t){if(-1!=e(t).attr(settings.hook).indexOf(theRel))return e(t).find("img").attr("alt")?e(t).find("img").attr("alt"):""}):e.makeArray(e(this).find("img").attr("alt"));pp_descriptions=isSet?jQuery.map(p,function(t){if(-1!=e(t).attr(settings.hook).indexOf(theRel))return e(t).attr("title")?e(t).attr("title"):""}):e.makeArray(e(this).attr("title"));pp_images.length>settings.overlay_gallery_max&&(settings.overlay_gallery=!1);1==pp_images.length?(settings.autoplay_slideshow=!1,settings.overlay_gallery=!1,e(".pp_previous, .pp_next").remove()):(settings.autoplay_slideshow=current_as_setting,settings.overlay_gallery=current_og_setting);set_position=jQuery.inArray(e(this).attr("href"),pp_images);rel_index=isSet?set_position:e("a["+settings.hook+"^='"+theRel+"']").index(e(this));h(this);settings.allow_resize&&e(window).bind("scroll.prettyphoto",function(){l()});e.prettyPhoto.open();1==pp_images.length&&e(".pp_previous, .pp_next").remove();!1===r.show_desc&&e(".pp_description").remove();return!1};e.prettyPhoto.open=function(t,s,u,l){"undefined"==typeof settings&&(settings=r,pp_images=e.makeArray(t),pp_titles=s?e.makeArray(s):e.makeArray(""),pp_descriptions=u?e.makeArray(u):e.makeArray(""),isSet=1').css({width:settings.default_width}).wrapInner('
').appendTo(e("body")).show(),doresize=!1,m=o(e(myClone).width(),e(myClone).height()),doresize=!0,e(myClone).remove(),toInject=settings.inline_markup.replace(/{content}/g,e(pp_images[set_position]).html())}!imgPreloader&&!skipInjection&&($pp_pic_holder.find("#pp_full_res")[0].innerHTML=toInject,i())});t=f(pp_images[set_position]);"youtube"==t||"vimeo"==t||"quicktime"==t||"flash"==t?e(".pp_gallery").hide():e(".pp_content").hover(function(){e(".pp_gallery:not(.disabled)").fadeIn()},function(){e(".pp_gallery:not(.disabled)").fadeOut()});return!1};e.prettyPhoto.changePage=function(t){currentGalleryPage=0;"previous"==t?(set_position--,0>set_position&&(set_position=e(pp_images).size()-1)):"next"==t?(set_position++,set_position>e(pp_images).size()-1&&(set_position=0)):set_position=t;rel_index=set_position;doresize||(doresize=!0);settings.allow_expand&&e(".pp_contract").removeClass("pp_contract").addClass("pp_expand");s(function(){e.prettyPhoto.open()})};e.prettyPhoto.changeGalleryPage=function(e){"next"==e?(currentGalleryPage++,currentGalleryPage>totalPage&&(currentGalleryPage=0)):"previous"==e?(currentGalleryPage--,0>currentGalleryPage&&(currentGalleryPage=totalPage)):currentGalleryPage=e;slide_speed="next"==e||"previous"==e?settings.animation_speed:0;slide_to=currentGalleryPage*itemsPerPage*itemWidth;$pp_gallery.find("ul").animate({left:-slide_to},slide_speed)};e.prettyPhoto.startSlideshow=function(){"undefined"==typeof T?($pp_pic_holder.find(".pp_play").unbind("click").removeClass("pp_play").addClass("pp_pause").click(function(){e.prettyPhoto.stopSlideshow();return!1}),T=setInterval(e.prettyPhoto.startSlideshow,settings.slideshow)):e.prettyPhoto.changePage("next")};e.prettyPhoto.stopSlideshow=function(){$pp_pic_holder.find(".pp_pause").unbind("click").removeClass("pp_pause").addClass("pp_play").click(function(){e.prettyPhoto.startSlideshow();return!1});clearInterval(T);T=void 0};e.prettyPhoto.close=function(){$pp_overlay.is(":animated")||(e.prettyPhoto.stopSlideshow(),$pp_pic_holder.stop().find("object,embed").css("visibility","hidden"),e("div.pp_pic_holder,div.ppt,.pp_fade").fadeOut(settings.animation_speed,function(){e(this).remove()}),$pp_overlay.fadeOut(settings.animation_speed,function(){settings.hideflash&&e("object,embed,iframe[src*=youtube],iframe[src*=vimeo]").css("visibility","visible");e(this).remove();e(window).unbind("scroll.prettyphoto");-1!==location.href.indexOf("#prettyPhoto")&&(location.hash="prettyPhoto");settings.callback();doresize=!0;g=!1;delete settings}))};!pp_alreadyInitialized&&t()&&(pp_alreadyInitialized=!0,hashRel=hashIndex=t(),hashIndex=hashIndex.substring(hashIndex.indexOf("/")+1,hashIndex.length-1),hashRel=hashRel.substring(0,hashRel.indexOf("/")),setTimeout(function(){e("a["+r.hook+"^='"+hashRel+"']:eq("+hashIndex+")").trigger("click")},50));return this.unbind("click.prettyphoto").bind("click.prettyphoto",e.prettyPhoto.initialize)}})(jQuery);var pp_alreadyInitialized=!1;